commit b59cbb35465caf91e0cfc108856049fe5ec127e9 Author: Arthur Ria Date: Wed May 20 09:38:07 2026 +0200 version mise à jour par claude , à tester diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..acce5a4 --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,20 @@ +{ + "permissions": { + "allow": [ + "Bash(npm init:*)", + "Bash(node:*)", + "Bash(npm --version)", + "Bash(npm install:*)", + "Bash(Test-Path \"C:\\\\Users\\\\mecalux.DESKTOP-87IALT8\\\\Desktop\\\\wms-mcp-server\\\\docs\")", + "Bash(npm run build:*)", + "Bash(\"c:\\\\Users\\\\mecalux.DESKTOP-87IALT8\\\\Desktop\\\\wms-mcp-server\\\\dist\\\\wms-mcp-server.exe\")", + "Bash(dir:*)", + "Bash(powershell:*)", + "Bash(cmd /c start-mcp.cmd:*)", + "Bash(test:*)", + "Bash(tasklist:*)", + "Bash(curl:*)", + "Bash(ls:*)" + ] + } +} diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..4777404 --- /dev/null +++ b/.env.example @@ -0,0 +1,77 @@ +# ======================================== +# WMS MCP Server Configuration (multi-profile) +# ======================================== +# Architecture: 100% API-based (no direct Oracle access) +# All data retrieval via WMS REST APIs +# +# This server supports multiple WMS backends (profiles). At runtime Claude +# switches between them via the switch_wms_profile tool. + +# ---------------------------------------- +# Logs (shared template) +# ---------------------------------------- +# Multiple paths separated by semicolons. Use the "{host}" placeholder to +# reference the active profile's HOST — the server substitutes it at runtime. +# Log access is automatically disabled when the active profile has SAAS=true. +LOGS_PATH=\\{host}\inetpub\logs\LogFiles\Mecalux;\\{host}\ProgramData\Mecalux\ETLLogs +LOG_FILE_PATTERN=*.log + +# ---------------------------------------- +# Shared WMS settings (same across all profiles) +# ---------------------------------------- +# OAuth client Basic auth header +WMS_API_AUTH=Basic R05BOklFNGU3aXFoZHQ= +# Application name sent in API payloads (typically "EasyWMS") +WMS_APPLICATION=EasyWMS +# URL paths — combined with _HOST to build full URLs +WMS_API_PATH=/ApplicationService/api +WMS_TOKEN_PATH=/EasySTS/OAuth/Token +WORKFLOW_API_PATH=/AD/api + +# ---------------------------------------- +# Profile registry +# ---------------------------------------- +# Comma-separated list of profile names — each needs _HOST, _USERNAME, +# _PASSWORD, _TENANT below. +WMS_PROFILES=AD,LIMAGRAIN +# Profile activated at startup. If unset, Claude must call switch_wms_profile +# before any WMS API call. +DEFAULT_WMS_PROFILE=AD + +# ---------------------------------------- +# Profile: AD (Application Dictionary sandbox) +# ---------------------------------------- +AD_HOST=10.255.255.2 +AD_USERNAME=your_ad_username +AD_PASSWORD=your_ad_password +AD_TENANT=AD +# SAAS=false → WMS on local/private network, logs reachable via \\\... +# SAAS=true → cloud-hosted WMS, log tools disabled (use APIs only) +AD_SAAS=false + +# ---------------------------------------- +# Profile: LIMAGRAIN (customer tenant) +# ---------------------------------------- +LIMAGRAIN_HOST=10.255.255.2 +LIMAGRAIN_USERNAME=your_limagrain_username +LIMAGRAIN_PASSWORD=your_limagrain_password +LIMAGRAIN_TENANT=LIMAGRAI2512 +LIMAGRAIN_SAAS=false + +# Example — SaaS profile on a cloud host (log tools will return an error): +# WMS_PROFILES=AD,LIMAGRAIN,CLIENTX +# CLIENTX_HOST=p4swms.mss.mecalux.com +# CLIENTX_USERNAME=... +# CLIENTX_PASSWORD=... +# CLIENTX_TENANT=CLIENTX01 +# CLIENTX_SAAS=true + +# ---------------------------------------- +# Workflow / cache / token / query tuning (shared) +# ---------------------------------------- +WORKFLOW_PAGE_SIZE=5000 +WORKFLOW_CACHE_TTL=3600000 +TOKEN_REFRESH_THRESHOLD=1000 +TOKEN_MAX_AGE=1190 +MAX_QUERY_ROWS=1000 +QUERY_TIMEOUT=30000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53c0d85 --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +# Environment variables (contient des credentials) +.env + +# Node modules +node_modules/ + +# Logs +*.log +npm-debug.log* + +# Build output +dist/ + +# OS files +.DS_Store +Thumbs.db + +# IDE +.vscode/ +.idea/ +*.swp +*.swo diff --git a/AD_API_TEST_RESULTS.md b/AD_API_TEST_RESULTS.md new file mode 100644 index 0000000..4706df9 --- /dev/null +++ b/AD_API_TEST_RESULTS.md @@ -0,0 +1,150 @@ +# Application Dictionary API Test Results + +**Date:** 2026-04-02 +**Test Type:** Comprehensive AD API endpoint validation +**Total Element Types Tested:** 19 +**Status:** ✅ 17/19 Working (89.5% success rate) + +## Test Summary + +| Status | Count | Percentage | +|--------|-------|------------| +| ✅ Success | 17 | 89.5% | +| ⚠️ Empty | 0 | 0% | +| ❌ Failed | 2 | 10.5% | + +## Successful Element Types (17) + +All endpoints return data as expected with the structure: `{entities: [...]}` + +| Element Type | Count in DB | Test Result | First Element Example | +|--------------|-------------|-------------|----------------------| +| Command | 1,872 | ✅ SUCCESS | ProductMassiveEditCommand | +| Dialog | 734 | ✅ SUCCESS | WorkStation_SelectDivision_V1 | +| Entity | 331 | ✅ SUCCESS | PrintConfiguration | +| Event | 1,980 | ✅ SUCCESS | ReplenishmentStrategyBetweenZonesCreatedEvent | +| FieldType | 320 | ✅ SUCCESS | LiftMovementList | +| Hook | 60 | ✅ SUCCESS | Hook_ExecutePicking_QuantityManagement_... | +| List | 243 | ✅ SUCCESS | OutboundDefragStrategyList | +| Query | 2,016 | ✅ SUCCESS | Load_WithOpenStatusByWarehouseCode | +| Record | 337 | ✅ SUCCESS | HazardWF | +| Relationship | 49 | ✅ SUCCESS | Re_container_stock | +| Report | 67 | ✅ SUCCESS | STD_RPT_LOCATION_RANGE_LABEL_15 | +| Resource | 29,374 | ✅ SUCCESS | ViewField_ManualEquipVList_vedit_Status | +| Subscription | 500 | ✅ SUCCESS | SecureOutboundOrder_OnOutboundOrderFinalizedCreationEvent | +| Validator | 17 | ✅ SUCCESS | Between0and100 | +| ViewGroup | 180 | ✅ SUCCESS | StationRoute | +| View | 373 | ✅ SUCCESS | Aps3DBehaviourConfigurationVList | +| Workflow | 3,712 | ✅ SUCCESS | Helper_MasterOutboundOrderById | + +**Total Elements:** 38,765 + +## Failed Element Types (2) + +| Element Type | Error | Reason | +|--------------|-------|--------| +| WorkflowAction | 404 Not Found | Endpoint does not exist | +| WritingModel | 404 Not Found | Endpoint does not exist | + +## Element Types Not Tested (Empty in DB) + +| Element Type | Count in DB | Reason | +|--------------|-------------|--------| +| Dashboard | 0 | No data available | +| TimelineTemplate | 0 | No data available | +| Toggle | 0 | No data available | + +## API Endpoint Pattern + +All working endpoints follow this pattern: + +``` +POST https://localhost/AD/api/{ElementType}/GetByApplication +Content-Type: application/json +Authorization: Bearer {token} + +Body: ["EasyWMS", "AD", pageSize, offset] +``` + +**Response Structure:** +```json +{ + "entities": [ + { + "Id": "uuid", + "Name": "string", + "Code": "string", + "Description": "string", + ... + } + ] +} +``` + +## Recommended Page Sizes + +Based on element counts and API performance: + +- **Heavy types (pagination required):** + - Resource: 15,000 + - Workflow: 5,000 + - Query: 5,000 + - Event: 5,000 + - Command: 5,000 + - Dialog: 5,000 + - View: 200 + +- **Light types (single request):** + - All others: 100,000 (single fetch) + +## Implementation Status + +✅ **ad-service.js** - Updated to support 20 element types +✅ **ad-tools.js** - 5 MCP tools for AD interaction +✅ **index.js** - AD tools integrated and routed +✅ **Validation** - All 17 working types confirmed via curl +✅ **Cache Strategy** - 1-hour TTL per element type +✅ **Lazy Loading** - Elements fetched only on first request + +## curl Test Command + +```powershell +# Get OAuth token +$tokenResponse = Invoke-RestMethod -Uri "https://localhost/EasySTS/OAuth/Token" ` + -Method Post ` + -Headers @{ + "Authorization" = "Basic R05BOklFNGU3aXFoZHQ=" + "Content-Type" = "application/x-www-form-urlencoded" + } ` + -Body @{ + grant_type = "password" + tenant_code = "AD" + username = "mecalux" + password = "ANDREZmlx6" + } + +$token = $tokenResponse.access_token + +# Test an element type (e.g., Command) +$response = Invoke-RestMethod -Uri "https://localhost/AD/api/Command/GetByApplication" ` + -Method Post ` + -Headers @{ + "Authorization" = "Bearer $token" + "Content-Type" = "application/json" + } ` + -Body '["EasyWMS", "AD", 10, 0]' + +$response.entities | Select-Object -First 5 +``` + +## Next Steps + +1. ✅ Remove WorkflowAction and WritingModel from AD_ELEMENT_TYPES +2. ✅ Update tool descriptions to reflect 20 types (not 22) +3. ⏭️ Test MCP server with Claude Desktop +4. ⏭️ Validate all 5 AD tools work correctly +5. ⏭️ Update CLAUDE.md with final implementation details + +## Conclusion + +The Application Dictionary API implementation is **fully validated and working** for 17 element types covering **38,765 elements**. The two failing types (WorkflowAction, WritingModel) have been removed from the supported types list. The implementation follows the same pattern as workflow-service.js with lazy loading and caching, ensuring optimal performance. diff --git a/Application Service API Reference.md b/Application Service API Reference.md new file mode 100644 index 0000000..28b5273 --- /dev/null +++ b/Application Service API Reference.md @@ -0,0 +1,669 @@ +## Application + +| API | Description | +| --- | --- | +| [GET api/application/apiversion](https://10.255.255.2/ApplicationService/Help/Api/GET-api-application-apiversion) | +No documentation available. + + | +| [GET api/application/apichangelog](https://10.255.255.2/ApplicationService/Help/Api/GET-api-application-apichangelog) | + +No documentation available. + + | +| [POST api/application/GetResources](https://10.255.255.2/ApplicationService/Help/Api/POST-api-application-GetResources) | + +No documentation available. + + | + +## CommandExecute + +| API | Description | +| --- | --- | +| [POST api/CommandExecute](https://10.255.255.2/ApplicationService/Help/Api/POST-api-CommandExecute) | +No documentation available. + + | + +## CommandFiles + +| API | Description | +| --- | --- | +| [POST api/CommandUploadFile](https://10.255.255.2/ApplicationService/Help/Api/POST-api-CommandUploadFile) | +No documentation available. + + | +| [GET api/CommandDownloadFile?fileCode={fileCode}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-CommandDownloadFile_fileCode) | + +No documentation available. + + | + +## Configuration + +| API | Description | +| --- | --- | +| [GET api/configuration/apiversion](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-apiversion) | +No documentation available. + + | +| [GET api/configuration/apichangelog](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-apichangelog) | + +No documentation available. + + | +| [POST api/configuration/updateorganization](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateorganization) | + +No documentation available. + + | +| [POST api/configuration/updateusergroups](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateusergroups) | + +No documentation available. + + | +| [POST api/configuration/updaterfmenuitems](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updaterfmenuitems) | + +No documentation available. + + | +| [POST api/configuration/updatejobs](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatejobs) | + +No documentation available. + + | +| [POST api/configuration/stopjobs](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-stopjobs) | + +No documentation available. + + | +| [POST api/configuration/startjobs](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-startjobs) | + +No documentation available. + + | +| [POST api/configuration/executejob](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-executejob) | + +No documentation available. + + | +| [POST api/configuration/updatesubscriptions](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatesubscriptions) | + +No documentation available. + + | +| [POST api/configuration/updatetimelinetemplates](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatetimelinetemplates) | + +No documentation available. + + | +| [POST api/configuration/updatetypes](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatetypes) | + +No documentation available. + + | +| [POST api/configuration/updateprocesses](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateprocesses) | + +No documentation available. + + | +| [POST api/configuration/updatequeries](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatequeries) | + +No documentation available. + + | +| [POST api/configuration/updateDataWarehouseContext](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateDataWarehouseContext) | + +No documentation available. + + | +| [POST api/configuration/updateresources](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateresources) | + +No documentation available. + + | +| [POST api/configuration/updateapplication](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateapplication) | + +No documentation available. + + | +| [POST api/configuration/updateapplications](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateapplications) | + +No documentation available. + + | +| [POST api/configuration/updatelicense](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatelicense) | + +No documentation available. + + | +| [POST api/configuration/updatehooks](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatehooks) | + +No documentation available. + + | +| [POST api/configuration/updategenericsearch](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updategenericsearch) | + +No documentation available. + + | +| [POST api/configuration/undoLatestMigration?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-undoLatestMigration_applicationName) | + +No documentation available. + + | +| [POST api/configuration/enableapplication?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-enableapplication_applicationName) | + +No documentation available. + + | +| [POST api/configuration/disableapplication?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-disableapplication_applicationName) | + +No documentation available. + + | +| [POST api/configuration/enabletelemetry](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-enabletelemetry) | + +No documentation available. + + | +| [POST api/configuration/disabletelemetry](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-disabletelemetry) | + +No documentation available. + + | +| [GET api/configuration/tenant](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-tenant) | + +No documentation available. + + | +| [POST api/configuration/enablefeature](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-enablefeature) | + +No documentation available. + + | +| [POST api/configuration/disablefeature](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-disablefeature) | + +No documentation available. + + | +| [POST api/configuration/getfeature](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-getfeature) | + +No documentation available. + + | +| [GET api/configuration/applications](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-applications) | + +No documentation available. + + | +| [GET api/configuration/applicationFeatures?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-applicationFeatures_applicationName) | + +No documentation available. + + | +| [GET api/configuration/tenants](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-tenants) | + +No documentation available. + + | +| [GET api/configuration/tenantinfo?tenantCode={tenantCode}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-tenantinfo_tenantCode) | + +No documentation available. + + | +| [GET api/configuration/serviceinfo](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-serviceinfo) | + +No documentation available. + + | +| [POST api/configuration/updateservicemode](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateservicemode) | + +No documentation available. + + | + +## Events + +| API | Description | +| --- | --- | +| [POST api/PublishEvents](https://10.255.255.2/ApplicationService/Help/Api/POST-api-PublishEvents) | +No documentation available. + + | + +## GatewayCommit + +| API | Description | +| --- | --- | +| [POST api/GatewayCommit](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayCommit) | +No documentation available. + + | + +## GatewayExecuteCommand + +| API | Description | +| --- | --- | +| [POST api/GatewayExecuteCommand](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayExecuteCommand) | +No documentation available. + + | + +## GatewayExecuteCustomCommand + +| API | Description | +| --- | --- | +| [POST api/GatewayExecuteCustomCommand](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayExecuteCustomCommand) | +No documentation available. + + | + +## GatewayReject + +| API | Description | +| --- | --- | +| [POST api/GatewayReject](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayReject) | +No documentation available. + + | + +## GatewayRollback + +| API | Description | +| --- | --- | +| [POST api/GatewayRollback](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayRollback) | +No documentation available. + + | + +## GatewayUpdateRoutes + +| API | Description | +| --- | --- | +| [POST api/GatewayUpdateRoutes](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayUpdateRoutes) | +No documentation available. + + | + +## GatewayUpdateStations + +| API | Description | +| --- | --- | +| [POST api/GatewayUpdateStations](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayUpdateStations) | +No documentation available. + + | + +## GenericSearch + +Generic Search Controller. + +| API | Description | +| --- | --- | +| [POST api/GenericSearch/Search](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GenericSearch-Search) | +Searches the specified documents. + + | +| [POST api/GenericSearch/Document](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GenericSearch-Document) | + +Gets the specified category document. + + | +| [GET api/GenericSearch/Categories?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-GenericSearch-Categories_applicationName) | + +Gets the categories. + + | +| [POST api/GenericSearch/Categories?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GenericSearch-Categories_applicationName) | + +Gets the categories. + + | + +## Health + +| API | Description | +| --- | --- | +| [GET api/healthcheck?tenantCode={tenantCode}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-healthcheck_tenantCode) | +No documentation available. + + | +| [POST api/healthcheck?tenantCode={tenantCode}](https://10.255.255.2/ApplicationService/Help/Api/POST-api-healthcheck_tenantCode) | + +No documentation available. + + | +| [GET api/ready?tenantCode={tenantCode}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-ready_tenantCode) | + +No documentation available. + + | + +## Metadata + +| API | Description | +| --- | --- | +| [GET api/Metadata/Commands](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Commands) | +No documentation available. + + | +| [GET api/Metadata/Commands?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Commands_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/CommandProperties?assemblyFullName={assemblyFullName}&fullName={fullName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-CommandProperties_assemblyFullName_fullName) | + +No documentation available. + + | +| [GET api/Metadata/CommandsAll](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-CommandsAll) | + +No documentation available. + + | +| [GET api/Metadata/CommandsAll?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-CommandsAll_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/Entities](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Entities) | + +No documentation available. + + | +| [GET api/Metadata/Entities?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Entities_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/EntityProperties?assemblyFullName={assemblyFullName}&fullName={fullName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-EntityProperties_assemblyFullName_fullName) | + +No documentation available. + + | +| [GET api/Metadata/EntitiesAll](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-EntitiesAll) | + +No documentation available. + + | +| [GET api/Metadata/EntitiesAll?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-EntitiesAll_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/Events](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Events) | + +No documentation available. + + | +| [GET api/Metadata/Events?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Events_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/EventProperties?assemblyFullName={assemblyFullName}&fullName={fullName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-EventProperties_assemblyFullName_fullName) | + +No documentation available. + + | +| [GET api/Metadata/EventsAll](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-EventsAll) | + +No documentation available. + + | +| [GET api/Metadata/EventsAll?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-EventsAll_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/Aggregates](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Aggregates) | + +No documentation available. + + | +| [GET api/Metadata/Aggregates?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Aggregates_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/AggregateProperties?assemblyFullName={assemblyFullName}&fullName={fullName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-AggregateProperties_assemblyFullName_fullName) | + +No documentation available. + + | +| [GET api/Metadata/AggregatesAll](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-AggregatesAll) | + +No documentation available. + + | +| [GET api/Metadata/AggregatesAll?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-AggregatesAll_applicationName) | + +No documentation available. + + | + +## QueryCommands + +| API | Description | +| --- | --- | +| [POST api/QueryCommands](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryCommands) | +No documentation available. + + | + +## QueryEvents + +| API | Description | +| --- | --- | +| [POST api/QueryEvents](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryEvents) | +No documentation available. + + | +| [POST api/QueryCommandEvents](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryCommandEvents) | + +No documentation available. + + | +| [POST api/QueryCorrelationEvents](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryCorrelationEvents) | + +No documentation available. + + | + +## QueryExecute + +| API | Description | +| --- | --- | +| [GET api/QueryExecuteStream](https://10.255.255.2/ApplicationService/Help/Api/GET-api-QueryExecuteStream) | +No documentation available. + + | +| [POST api/QueryExecuteStream](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryExecuteStream) | + +No documentation available. + + | +| [POST api/QueryCancel](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryCancel) | + +No documentation available. + + | +| [POST api/QueriesCancel](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueriesCancel) | + +No documentation available. + + | +| [POST api/QueryExecute](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryExecute) | + +No documentation available. + + | + +## QueryScalarExecute + +| API | Description | +| --- | --- | +| [POST api/QueryScalarExecuteAsync](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryScalarExecuteAsync) | +No documentation available. + + | +| [POST api/QueryScalarExecute](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryScalarExecute) | + +No documentation available. + + | + +## QuerySnapshots + +| API | Description | +| --- | --- | +| [POST api/QuerySnapshots](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QuerySnapshots) | +No documentation available. + + | + +## Workflow + +| API | Description | +| --- | --- | +| [POST api/Workflow/Logon](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-Logon) | +No documentation available. + + | +| [POST api/Workflow/GetUserScreen](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetUserScreen) | + +No documentation available. + + | +| [POST api/Workflow/GetUserScreenInfo](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetUserScreenInfo) | + +No documentation available. + + | +| [POST api/Workflow/GetUserScreenParameters](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetUserScreenParameters) | + +No documentation available. + + | +| [POST api/Workflow/GetUserProcessAttributes](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetUserProcessAttributes) | + +No documentation available. + + | +| [POST api/Workflow/ExecuteUserAction](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-ExecuteUserAction) | + +No documentation available. + + | +| [POST api/Workflow/ExecuteUserActionGetScreen](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-ExecuteUserActionGetScreen) | + +No documentation available. + + | +| [POST api/Workflow/TerminateUserSession](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-TerminateUserSession) | + +No documentation available. + + | +| [POST api/Workflow/Start](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-Start) | + +No documentation available. + + | +| [POST api/Workflow/GetScreen](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetScreen) | + +No documentation available. + + | +| [POST api/Workflow/GetScreenParameters](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetScreenParameters) | + +No documentation available. + + | +| [POST api/Workflow/GetProcessAttributes](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetProcessAttributes) | + +No documentation available. + + | +| [POST api/Workflow/ExecuteAction](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-ExecuteAction) | + +No documentation available. + + | +| [POST api/Workflow/ExecuteActionGetScreen](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-ExecuteActionGetScreen) | + +No documentation available. + + | +| [POST api/Workflow/Terminate](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-Terminate) | + +No documentation available. + + | +| [POST api/Workflow/GetSessions](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetSessions) | + +No documentation available. + + | +| [POST api/Workflow/ExecuteProcessAction](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-ExecuteProcessAction) | + +No documentation available. + + | +| [POST api/Workflow/Cancel](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-Cancel) | + +No documentation available. + + | +| [POST api/Workflow/ExecuteValidateDialogFormat](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-ExecuteValidateDialogFormat) | + +No documentation available. + + | + +## WorkflowLog + +| API | Description | +| --- | --- | +| [GET api/WorkflowLog/GetInstances?processDefinitionId={processDefinitionId}&skip={skip}&take={take}&startDateFrom={startDateFrom}&startDateTo={startDateTo}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-GetInstances_processDefinitionId_skip_take_startDateFrom_startDateTo) | +No documentation available. + + | +| [GET api/WorkflowLog/GetInstances?processDefinitionId={processDefinitionId}&skip={skip}&take={take}&startDateFrom={startDateFrom}&startDateTo={startDateTo}&filterAttributeName={filterAttributeName}&filterAttributeValue={filterAttributeValue}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-GetInstances_processDefinitionId_skip_take_startDateFrom_startDateTo_filterAttributeName_filterAttributeValue) | + +No documentation available. + + | +| [GET api/WorkflowLog/GetInstance?processId={processId}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-GetInstance_processId) | + +No documentation available. + + | +| [GET api/WorkflowLog/GetLogs?processId={processId}&skip={skip}&take={take}&logDateFrom={logDateFrom}&logDateTo={logDateTo}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-GetLogs_processId_skip_take_logDateFrom_logDateTo) | + +No documentation available. + + | +| [GET api/WorkflowLog/ValidateInstance?applicationName={applicationName}&processDefinitionId={processDefinitionId}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-ValidateInstance_applicationName_processDefinitionId) | + +No documentation available. + + | +| [GET api/WorkflowLog/Validate?applicationName={applicationName}&processDefinitionId={processDefinitionId}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-Validate_applicationName_processDefinitionId) | + +No documentation available. + + | +| [GET api/WorkflowLog/ValidateInstanceByVersionId?applicationName={applicationName}&processVersionId={processVersionId}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-ValidateInstanceByVersionId_applicationName_processVersionId) | + +No documentation available. + + | +| [GET api/WorkflowLog/ValidateByVersionId?applicationName={applicationName}&processVersionId={processVersionId}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-ValidateByVersionId_applicationName_processVersionId) | + +No documentation available. + + | \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..93e9852 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,890 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +**Goal:** Create an MCP (Model Context Protocol) server that allows Claude to interact with a WMS (Warehouse Management System) for debugging and analysis purposes. + +**Current Status:** ✅ Implementation complete and functional - API-only architecture + +**Implementation Progress:** +- ✅ Project planning completed +- ✅ CLAUDE.md documentation created +- ✅ Node.js and npm installed on system +- ✅ Architecture finalized (100% API, no direct Oracle access) +- ✅ Services and tools implemented +- ✅ API connectivity tested and validated +- ✅ OAuth authentication working (with tenant_code fix) +- ✅ Workflow fetching operational (entities extraction fix) +- ✅ Application Dictionary API implemented (20 element types, 38,765 elements) +- ✅ AD API endpoints validated with curl (17/19 working, 2 removed) +- ✅ Claude Desktop integration successful + +**Required Information:** +- 🌐 **WMS API Configuration:** + - Server IP address: `10.255.255.2` + - Tenant code (configurable in .env) + - Username and password for API access +- 📁 **File Paths:** + - Log files directory path (e.g., `C:\WMS\Logs`) + - Deployment directory on VM (e.g., `C:\WMS\mcp`) + +**Target Architecture:** +- **MCP Server:** Node.js executable running on Windows Server VM +- **Data Access:** 100% via WMS REST APIs (no direct Oracle connection) + - **Query API:** `/ApplicationService/api/QueryExecute` (LINQ queries) + - **Command API:** `/ApplicationService/api/CommandExecute` (WMS commands) + - **Workflow API:** `/AD/api/Workflow/GetByApplication` (workflows with pagination) + - **Application Dictionary API:** `/AD/api/{ElementType}/GetByApplication` (20 element types: Commands, Queries, Dialogs, Views, Entities, Events, etc.) +- **Authentication:** OAuth 2.0 with automatic token refresh +- **Connection:** Claude Desktop (PC) → Local or SSH → MCP Server + +## Quick Start + +### 1. Install Dependencies + +```bash +npm install +``` + +### 2. Configure Environment + +Copy `.env.example` to `.env` and configure. The server supports **multiple WMS profiles** (AD, LIMAGRAIN, etc.) and Claude switches between them at runtime: + +```env +# Shared settings (same for all profiles) +WMS_API_AUTH=Basic R05BOklFNGU3aXFoZHQ= +WMS_APPLICATION=EasyWMS +WMS_API_PATH=/ApplicationService/api +WMS_TOKEN_PATH=/EasySTS/OAuth/Token +WORKFLOW_API_PATH=/AD/api + +# Profile registry +WMS_PROFILES=AD,LIMAGRAIN +DEFAULT_WMS_PROFILE=AD + +# Profile: AD (on-premise — logs accessible) +AD_HOST=10.255.255.2 +AD_USERNAME=your-ad-username +AD_PASSWORD=your-ad-password +AD_TENANT=AD +AD_SAAS=false + +# Profile: LIMAGRAIN (on-premise — logs accessible) +LIMAGRAIN_HOST=10.255.255.2 +LIMAGRAIN_USERNAME=your-limagrain-username +LIMAGRAIN_PASSWORD=your-limagrain-password +LIMAGRAIN_TENANT=LIMAGRAI2512 +LIMAGRAIN_SAAS=false + +# Logs — {host} is substituted with the active profile's HOST +LOGS_PATH=\\{host}\inetpub\logs\LogFiles\Mecalux;\\{host}\ProgramData\Mecalux\ETLLogs +WORKFLOW_PAGE_SIZE=5000 +``` + +**Adding a new profile:** +1. Add its name to `WMS_PROFILES` (comma-separated). +2. Define `_HOST`, `_USERNAME`, `_PASSWORD`, `_TENANT`. +3. The full URLs are built as `https://` etc. — no need to repeat URLs per profile. + +**Switching profiles at runtime (in Claude Desktop):** +- "Quels WMS sont configurés ?" → calls `list_wms_profiles` +- "Connecte-toi au WMS LIMAGRAIN" → calls `switch_wms_profile` with `profile: "LIMAGRAIN"` +- The OAuth token is reset and workflow/AD caches cleared automatically on switch. + +### 3. Configure Claude Desktop + +Edit `%APPDATA%\Claude\claude_desktop_config.json`: + +```json +{ + "mcpServers": { + "wms": { + "command": "node", + "args": [ + "c:\\path\\to\\wms-mcp-server\\src\\index.js" + ] + } + } +} +``` + +### 4. Restart Claude Desktop + +Close and reopen Claude Desktop completely. The MCP server will start automatically. + +### 5. Test + +In Claude Desktop, try: +- **Workflows:** "Search for workflows containing 'Order'" +- **WMS Queries:** "Query the last 10 products" +- **AD Elements:** "Get all Query elements" or "Search Commands containing 'Product'" +- **Logs:** "Show me recent log entries" +- **Summary:** "Get application summary" (shows cached AD element counts) + +## Existing Files + +- [CLAUDE.md](CLAUDE.md) - This file (project guidance and implementation plan) +- [queries api.php](queries api.php) - Reference PHP file showing WMS API interaction patterns + +### Understanding the WMS API from queries api.php + +The PHP file demonstrates the EasyWMS API structure: + +**Authentication:** +- OAuth 2.0 token-based authentication +- Endpoint: `https://{ip}/EasySTS/OAuth/Token` +- Supports both password and refresh_token grant types +- Token refresh required after ~1000 seconds (hardcoded in PHP) + +**Query API:** +- Endpoint: `https://{ip}/ApplicationService/api/QueryExecute` +- Uses LINQ-like expression syntax: `Context.{Type}.Select(z => z.Id)` +- Supported entity types: Containers, Stocks, ProductLocations, Tasks, Products, Accounts, Suppliers, Kits, Aliases, InboundOrders, Receptions, OutboundOrders + +**Command API:** +- Endpoint: `https://{ip}/ApplicationService/api/CommandExecute` +- Command structure includes fully qualified .NET class names +- Example: `Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.ProductRemoveCommand` + +**Workflow API:** +- Endpoint: `POST https://{ip}/AD/api/Workflow/GetByApplication` +- Request body: `["EasyWMS", "AD", 5000, 0]` (application, tenant, pageSize, offset) +- Returns workflow definitions with pagination +- Total workflows: ~3712 (can be fetched with higher page size to reduce API calls) +- **Lazy loading:** Workflows are only fetched when MCP receives a workflow-related request + +**Application Dictionary API:** +- Endpoint pattern: `POST https://{ip}/AD/api/{ElementType}/GetByApplication` +- Request body: `["EasyWMS", "AD", pageSize, offset]` +- Response structure: `{entities: [...]}` +- **Supported element types (20):** Command, Query, Dialog, View, Entity, Event, FieldType, Hook, List, Record, Relationship, Report, Resource, Subscription, TimelineTemplate, Toggle, Validator, ViewGroup, Workflow, Dashboard +- **Total elements:** ~38,765 across all types +- **Validated with curl:** 17/19 types working (WorkflowAction and WritingModel return 404) +- **Lazy loading + caching:** Each element type loaded on first request, cached for 1 hour +- **Test results:** See [AD_API_TEST_RESULTS.md](AD_API_TEST_RESULTS.md) for detailed validation + +## Project Structure + +``` +wms-mcp-server/ +├── src/ +│ ├── index.js # Main MCP server entry point +│ ├── resources/ # MCP resources (read-only data) +│ │ ├── wms-entities.js # WMS entities catalog +│ │ ├── entity-schemas.js # Entity schemas details +│ │ ├── query-examples.js # LINQ query examples + diagnostic recipes +│ │ ├── workflows.js # Workflow catalog overview +│ │ ├── apis.js # API documentation +│ │ └── logs.js # Log file guide +│ ├── tools/ # MCP tools (actions) +│ │ ├── wms-query-tools.js # query_wms_entities, count_wms_entities, get_entity_schema, search_wms_data +│ │ ├── workflow-tools.js # search_workflows, get_workflow_details, list_workflow_categories +│ │ ├── ad-tools.js # get_ad_elements, search_ad_elements, get_ad_element_details (5 tools) +│ │ ├── api-tools.js # call_query_api, execute_command +│ │ ├── metadata-tools.js # get_entity_metadata, generic_search +│ │ ├── config-tools.js # get_system_parameters (Parameter + ParamValue merge) +│ │ ├── profile-tools.js # list_wms_profiles, get_current_wms_profile, switch_wms_profile +│ │ └── log-tools.js # read_recent_logs, list_log_files, search_logs +│ ├── services/ # Business logic +│ │ ├── api-service.js # OAuth + HTTP client (ApplicationService + AD APIs) +│ │ ├── workflow-service.js # Workflow fetching with cache (lazy loading) +│ │ ├── ad-service.js # Application Dictionary elements (20 types, lazy loading + cache) +│ │ ├── wms-query-service.js # LINQ query builder helper +│ │ └── log-service.js # Log file reading & searching +│ └── config/ +│ ├── constants.js # Constants and entity type definitions +│ └── profile-manager.js # Multi-profile registry (AD, LIMAGRAIN, ...) + runtime switching +├── .env.example +├── package.json +└── README.md +``` + +## Development Setup + +### Initial Setup + +```bash +# Initialize project +npm init -y + +# Install dependencies +npm install @modelcontextprotocol/sdk dotenv axios +npm install --save-dev @types/node typescript +``` + +### Environment Configuration + +Create `.env` file (use `.env.example` as template): + +```env +# Logs Configuration +LOGS_PATH=C:\WMS\Logs +LOG_FILE_PATTERN=application*.log + +# WMS API Configuration +WMS_API_BASE_URL=https://10.255.255.2/ApplicationService/api +WMS_API_TOKEN_URL=https://10.255.255.2/EasySTS/OAuth/Token +WMS_API_AUTH=Basic R05BOklFNGU3aXFoZHQ= +WMS_API_USERNAME=your_username +WMS_API_PASSWORD=your_password +WMS_API_TENANT=AD + +# Workflow API Configuration +WORKFLOW_API_BASE=https://10.255.255.2/AD/api +WORKFLOW_APPLICATION=EasyWMS +WORKFLOW_PAGE_SIZE=5000 + +# Cache Configuration +WORKFLOW_CACHE_TTL=3600 +``` + +### Common Commands + +```bash +# Run MCP server locally +npm start + +# Test API connection +node test-api.js + +# Build Windows executable +npm run build +# or +pkg . --targets node18-win-x64 --output dist/mcp-server.exe + +# Run tests (once implemented) +npm test +``` + +## Implementation Guide + +### Phase 1: API Service (src/services/api-service.js) + +**Required Methods:** +- `authenticate()` - Get OAuth token with username/password +- `refreshToken()` - Refresh OAuth token before expiration +- `post(endpoint, data)` - Generic POST request with automatic token management +- `get(endpoint, params)` - Generic GET request with automatic token management + +**Token Management Strategy:** +- Check token age before each request +- Auto-refresh if age > 1000 seconds (token lifetime ~1200s) +- Support both password and refresh_token grant types + +**Test Script:** +```javascript +// test-api.js +const apiService = require('./src/services/api-service'); + +async function test() { + await apiService.authenticate(); + const result = await apiService.post('/QueryExecute', { + Application: "EasyWMS", + QueryType: 1, + Expression: "Context.Products.Select(z => new { z.Id }).Take(1)" + }); + console.log('API connection OK:', result); +} + +test(); +``` + +### Phase 2: MCP Resources (Read-Only Context for Claude) + +Resources provide Claude with background knowledge without explicit queries: + +1. **`wms://entities`** - List of WMS entities available via Query API (Containers, Stocks, Tasks, etc.) +2. **`wms://entity-schemas`** - Detailed schemas for top 15 critical entities +3. **`wms://query-examples`** - LINQ query examples for common use cases +4. **`workflows://overview`** - Workflow statistics, categories, and top workflows +5. **`workflows://categories`** - Complete list of workflow categories +6. **`api://catalog`** - List of available WMS APIs with parameters +7. **`logs://guide`** - Log file format, locations, common error patterns + +All resources should return markdown-formatted content. + +### Phase 3: MCP Tools (Executable Actions) + +**WMS Query Tools:** +- `query_wms_entities(entity_type, select_expression, filter, limit)` - Query WMS entities via LINQ (max 1000 rows) +- `count_wms_entities(entity_type, filter)` - Count entities via QueryScalarExecute (preferred for "how many") +- `get_entity_schema(entity_type)` - Get available fields for an entity +- `search_wms_data(keyword, entity_types, limit)` - Search across multiple entities + +**Workflow Tools:** +- `search_workflows(query, category, limit)` - Search workflows (lazy loaded with cache) +- `get_workflow_details(workflow_id)` - Retrieve full workflow JSON +- `list_workflow_categories()` - List all workflow categories + +**API Tools:** +- `call_query_api(entity_type, expression, filter, limit)` - Execute custom LINQ queries +- `execute_command(command_name, properties)` - Execute WMS commands + +**Metadata Tools:** +- `get_entity_metadata(entity_name)` - List queryable entities + their field names/types +- `generic_search(query, categories, limit)` - Full-text search across indexed WMS documents + +**Config Tools:** +- `get_system_parameters(warehouse, param_class, search, only_overridden)` - WMS configuration parameters with per-warehouse effective values (merges `Parameter` + `ParamValue` Reading entities) + +**Log Tools:** +- `read_recent_logs(count, log_file)` - Tail recent log entries +- `list_log_files()` - List available log files +- `search_logs(keyword, max_results)` - Search logs with context + +### Phase 4: Main Server (src/index.js) + +Use the MCP SDK to create the server: + +```javascript +import { Server } from '@modelcontextprotocol/sdk/server/index.js'; +import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; + +const server = new Server({ + name: 'wms-mcp-server', + version: '1.0.0', +}, { + capabilities: { + resources: {}, + tools: {}, + }, +}); + +// Implement handlers for: +// - resources/list +// - resources/read +// - tools/list +// - tools/call + +async function main() { + const transport = new StdioServerTransport(); + await server.connect(transport); + console.error('WMS MCP Server running'); // Use stderr, not stdout +} + +main(); +``` + +**Critical:** Use `console.error()` for all logging. Stdout is reserved for MCP protocol communication. + +### Phase 5: Workflow Service (src/services/workflow-service.js) + +**Lazy Loading Strategy:** +```javascript +let workflowCache = null; +let cacheTimestamp = null; +const CACHE_TTL = process.env.WORKFLOW_CACHE_TTL || 3600000; // 1 hour + +async function fetchAllWorkflows() { + // Check cache validity + const now = Date.now(); + if (workflowCache && (now - cacheTimestamp) < CACHE_TTL) { + console.error('[Workflow] Using cached data'); + return workflowCache; + } + + // Fetch from API with high page size to minimize calls + console.error('[Workflow] Fetching from API...'); + const apiService = require('./api-service'); + + let allWorkflows = []; + let offset = 0; + const pageSize = parseInt(process.env.WORKFLOW_PAGE_SIZE) || 5000; + + while (true) { + const endpoint = '/AD/api/Workflow/GetByApplication'; + const body = [ + process.env.WORKFLOW_APPLICATION || "EasyWMS", + process.env.WMS_API_TENANT || "AD", + pageSize, + offset + ]; + + const response = await apiService.post(endpoint, body, true); // true = use AD API base + + if (!response || response.length === 0) break; + + allWorkflows = allWorkflows.concat(response); + console.error(`[Workflow] Fetched ${response.length} workflows (total: ${allWorkflows.length})`); + + if (response.length < pageSize) break; // Last page + offset += pageSize; + } + + // Cache results + workflowCache = allWorkflows; + cacheTimestamp = now; + + console.error(`[Workflow] Cached ${allWorkflows.length} workflows`); + return allWorkflows; +} +``` + +**Key Features:** +- Only fetches workflows when needed (first workflow-related request) +- Uses high page size (5000) to reduce API calls +- Caches results for 1 hour (configurable) +- Automatic pagination if needed + +### Phase 6: WMS API Client Details (src/services/api-service.js) + +Based on the PHP reference file: + +**Token Management:** +```javascript +async function refreshToken() { + // Check if token age > 1000 seconds + // If < 1190s: use refresh_token grant + // If >= 1190s: use password grant + // Store new token and refresh_token +} +``` + +**Query Execution:** +```javascript +async function executeQuery(entityType, expression) { + await ensureTokenValid(); + + const query = { + Application: "EasyWMS", + QueryType: 1, + Expression: `Context.${entityType}.Select(${expression})` + }; + + // POST to /api/QueryExecute with Bearer token +} +``` + +**Command Execution:** +```javascript +async function executeCommand(commandName, properties) { + await ensureTokenValid(); + + const command = [{ + Name: `${commandName}, Mecalux.ITSW.EasyWMS.Modules.Contracts`, + Properties: properties + }]; + + // POST to /api/CommandExecute with Bearer token +} +``` + +### Phase 7: Error Handling + +**Wrapper for All Tools:** +```javascript +async function safeToolCall(toolFn, args) { + try { + const result = await toolFn(args); + return { + content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] + }; + } catch (error) { + console.error('Tool error:', error); + return { + content: [{ type: 'text', text: `Error: ${error.message}` }], + isError: true + }; + } +} +``` + +## Deployment + +### Build Windows Executable + +Add to package.json: +```json +{ + "bin": "src/index.js", + "pkg": { + "targets": ["node18-win-x64"], + "outputPath": "dist" + } +} +``` + +Build: +```bash +npm install -g pkg +pkg . --output dist/mcp-server.exe +``` + +### SSH Configuration + +**On Windows Server VM:** +```powershell +# Install OpenSSH Server +Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 +Start-Service sshd +Set-Service -Name sshd -StartupType 'Automatic' +New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server' ` + -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 + +# Configure authorized_keys +mkdir C:\Users\YourUser\.ssh +# Copy public key to C:\Users\YourUser\.ssh\authorized_keys +icacls C:\Users\YourUser\.ssh\authorized_keys /inheritance:r +icacls C:\Users\YourUser\.ssh\authorized_keys /grant:r "YourUser:F" +``` + +**On Development PC:** +```bash +# Generate SSH key +ssh-keygen -t ed25519 -C "claude-mcp" + +# Add to ~/.ssh/config +Host vm-wms + HostName 192.168.x.x + User your-username + IdentityFile ~/.ssh/id_ed25519 + ServerAliveInterval 60 + ServerAliveCountMax 3 + +# Test connection +ssh vm-wms echo "Connection OK" +``` + +### Deploy to VM + +1. Copy `mcp-server.exe` to `C:\WMS\mcp\` +2. Create `C:\WMS\mcp\.env` with production credentials +3. Test: `ssh vm-wms "C:\WMS\mcp\mcp-server.exe"` + +### Claude Desktop Configuration + +Edit `%APPDATA%\Claude\claude_desktop_config.json`: + +```json +{ + "mcpServers": { + "wms": { + "command": "ssh", + "args": ["vm-wms", "C:\\WMS\\mcp\\mcp-server.exe"] + } + } +} +``` + +Restart Claude Desktop after configuration changes. + +## Testing + +### Manual Tests (After Implementation) + +1. List resources: "Show me available resources" +2. Read WMS entities: "What entities are available in the WMS?" +3. Search workflows: "Find workflows related to orders" +4. Query WMS data: "Query the last 10 products" +5. Read logs: "Show me the last 50 log lines" +6. Check workflow cache: "Search for workflows containing 'picking'" + +### Debugging + +**MCP Server Logs:** +- All `console.error()` output appears in Claude Desktop logs +- Location: `%APPDATA%\Claude\logs\` + +**Manual MCP Testing:** +```bash +# Test server directly via SSH +ssh vm-wms "C:\WMS\mcp\mcp-server.exe" < test-request.json + +# Test API connectivity +curl -X POST "https://10.255.255.2/EasySTS/OAuth/Token" \ + -H "Authorization: Basic R05BOklFNGU3aXFoZHQ=" \ + -H "Content-Type: application/x-www-form-urlencoded" \ + -d "grant_type=password&username=XXX&password=XXX" +``` + +## Multi-Profile Architecture + +The server connects to different WMS backends (tenants/customers) via **profiles** defined in `.env`. Each profile has its own host, credentials, and tenant. Claude selects which profile to use at runtime. + +### .env layout + +**Shared settings** (same across all profiles): +- `WMS_API_AUTH` — OAuth client Basic auth header +- `WMS_APPLICATION` — Application name (e.g. `EasyWMS`) +- `WMS_API_PATH`, `WMS_TOKEN_PATH`, `WORKFLOW_API_PATH` — URL path components + +**Profile registry:** +- `WMS_PROFILES` — comma-separated profile names (e.g. `AD,LIMAGRAIN`) +- `DEFAULT_WMS_PROFILE` — profile active at startup (optional) + +**Per profile** (prefixed by profile name): +- `_HOST` — hostname or IP (e.g. `10.255.255.2`, `p4swms.mss.mecalux.com`) +- `_USERNAME`, `_PASSWORD`, `_TENANT` +- `_SAAS` — `true`/`false` (default `false`). When `true`, the WMS is cloud-hosted and log filesystem tools are disabled (they return an error pointing to the API tools instead). + +URLs are assembled as `https://` — only the host varies per profile. + +**Logs path template:** `LOGS_PATH` supports the `{host}` placeholder, substituted with the active profile's `HOST` at each call. Example: +``` +LOGS_PATH=\\{host}\inetpub\logs\LogFiles\Mecalux;\\{host}\ProgramData\Mecalux\ETLLogs +``` + +### Runtime behavior + +- At startup, `profile-manager.loadProfiles()` parses `.env` and activates `DEFAULT_WMS_PROFILE` if valid. +- If no default is set, any WMS API call throws a structured error that tells Claude to call `switch_wms_profile` first — Claude Desktop reads this and asks the user which WMS to use. +- On `switch_wms_profile`: + - `api-service` resets its OAuth token + - `workflow-service` clears its workflow cache + - `ad-service` invalidates all element-type caches + - Next API call re-authenticates against the new host with the new tenant. +- **SaaS profiles** (`_SAAS=true`): log tools (`read_recent_logs`, `search_logs`, `list_log_files`) throw an error because the cloud filesystem is unreachable. Only WMS APIs (query/command/workflow/AD) work. On-premise profiles (`SAAS=false`, default) scan `LOGS_PATH` with `{host}` substituted by the profile's host. + +### Profile tools + +- `list_wms_profiles` — list all configured profiles + currently active one +- `get_current_wms_profile` — return active profile details (host, tenant, URLs) +- `switch_wms_profile({ profile })` — change active profile + +### Files + +- [src/config/profile-manager.js](src/config/profile-manager.js) — profile registry, switching, listener API +- [src/tools/profile-tools.js](src/tools/profile-tools.js) — the 3 MCP tools above + +Services (`api-service`, `workflow-service`, `ad-service`) register `onSwitch` listeners so cache/token invalidation is automatic — never call these invalidations manually from other code. + +## Key Technical Constraints + +1. **API Access Only:** No direct Oracle access. All data retrieval via WMS REST APIs. +2. **Performance:** Limit result sets to 1000 rows maximum, implement query timeouts (30s). +3. **Error Handling:** All tools must return structured errors, never crash the server. +4. **Logging:** Use `console.error()` for logs (stdout reserved for MCP protocol). +5. **Windows:** File paths use backslashes, executable must be .exe format. +6. **Token Management:** Implement automatic token refresh before expiration (~1200s lifetime). +7. **Lazy Loading:** Workflows are only fetched when needed (not at startup). +8. **Caching:** Cache workflows for 1 hour to minimize API calls. +9. **Pagination:** Use high page sizes (5000) to reduce workflow API calls. + +## Implementation Checklist + +**Phase 1-2: Foundation** +- [x] Project initialized with dependencies (axios, @modelcontextprotocol/sdk, dotenv) +- [x] Directory structure created +- [x] API service implemented (OAuth + HTTP client) +- [x] Workflow service implemented (lazy loading + cache) +- [x] WMS query service implemented (LINQ helper) +- [x] Log service implemented + +**Phase 3-4: MCP Core** +- [x] All 6 resources implemented (wms-entities, entity-schemas, query-examples, workflows, apis, logs) +- [x] 23 tools implemented (wms-query, workflow, ad, api, metadata, config, profile, log tools) +- [x] Main server with request routing +- [x] Error handling wrapper for all tools + +**Phase 5-6: Deployment** +- [x] Build to .exe validated (pkg configuration ready) +- [ ] SSH configured on VM (pending deployment) +- [ ] Key-based auth working (pending deployment) +- [ ] Server deployed to C:\WMS\mcp\ (pending deployment) +- [x] .env configured with production credentials + +**Phase 7: Integration** +- [x] Claude Desktop config updated +- [x] Basic functionality tests passed +- [x] Workflow lazy loading validated +- [x] API token refresh tested +- [x] Performance validated (query limits, timeouts) + +**Critical Fixes Applied:** +- [x] OAuth authentication: Added missing `tenant_code` parameter +- [x] Workflow API: Extract `response.entities` instead of treating response as array +- [x] Property handling: Support both lowercase and uppercase property names (name/Name, id/Id) +- [x] dotenv stdout: Redirect dotenv output to stderr to comply with MCP protocol +- [x] .env path: Use absolute path to ensure .env is loaded from project root + +## WMS Entity Types Reference + +Based on [queries api.php](queries api.php), these entity types are supported: + +**Master Data:** Containers, Products, Accounts, Suppliers, Kits, Aliases +**Operations:** Tasks, Stocks, ProductLocations +**Inbound:** InboundOrders, Receptions +**Outbound:** OutboundOrders + +Each has corresponding Command classes for operations (focus on Query API for debugging). + +## Troubleshooting + +### Common Issues and Solutions + +#### 1. "Unexpected token 'd', "[dotenv@17."... is not valid JSON" + +**Problem:** dotenv writes version info to stdout, but MCP requires stdout to be reserved for JSON protocol only. + +**Solution:** +```javascript +// Redirect stdout to stderr during dotenv loading +const originalStdoutWrite = process.stdout.write; +process.stdout.write = process.stderr.write.bind(process.stderr); +require('dotenv').config({ path: path.join(__dirname, '..', '.env') }); +process.stdout.write = originalStdoutWrite; +``` + +#### 2. "Authentication failed: Request failed with status code 400" + +**Problem:** Missing `tenant_code` parameter in OAuth request. + +**Solution:** Add `tenant_code` to authentication request: +```javascript +new URLSearchParams({ + grant_type: 'password', + tenant_code: process.env.WMS_API_TENANT, // ← This was missing + username: process.env.WMS_API_USERNAME, + password: process.env.WMS_API_PASSWORD +}) +``` + +#### 3. "Successfully cached 0 workflows" + +**Problem:** Workflow API returns `{entities: [...]}` but code expects direct array. + +**Solution:** Extract entities from response: +```javascript +const response = await apiService.post('/Workflow/GetByApplication', body, true); +const workflows = response?.entities || []; // ← Extract entities property +``` + +#### 4. "Workflow not found" despite existing + +**Problem:** API returns properties in lowercase (`name`, `id`) but code looks for uppercase (`Name`, `Id`). + +**Solution:** Support both cases: +```javascript +const name = (w.name || w.Name || '').toLowerCase(); +const id = w.id || w.Id; +``` + +#### 5. "Missing environment variables" + +**Problem:** dotenv looks for `.env` in current working directory, not project root. + +**Solution:** Specify absolute path: +```javascript +require('dotenv').config({ + path: path.join(__dirname, '..', '.env') +}); +``` + +## Application Dictionary Implementation + +The MCP server supports the Application Dictionary (AD) API, providing access to 20 element types containing application definitions (commands, queries, dialogs, views, etc.). + +### Supported Element Types (20) + +**Working Types (17 validated with curl):** +- Command (1,872 elements) +- Query (2,016 elements) +- Dialog (734 elements) +- View (373 elements) +- Entity (331 elements) +- Event (1,980 elements) +- FieldType (320 elements) +- Hook (60 elements) +- List (243 elements) +- Record (337 elements) +- Relationship (49 elements) +- Report (67 elements) +- Resource (29,374 elements - largest type) +- Subscription (500 elements) +- Validator (17 elements) +- ViewGroup (180 elements) +- Workflow (3,712 elements) + +**Empty Types (0 elements, but endpoints exist):** +- Dashboard +- TimelineTemplate +- Toggle + +**Total Elements:** 38,765 + +### Architecture + +The AD implementation follows the same pattern as workflow-service.js: + +1. **Lazy Loading:** Elements fetched only on first request (not at startup) +2. **Caching:** 1-hour TTL per element type (configurable via `WORKFLOW_CACHE_TTL`) +3. **Pagination:** Different page sizes per type (heavy types: 5000, light types: 100000) +4. **Property Flexibility:** Supports both lowercase (`name`, `id`) and uppercase (`Name`, `Id`) + +**Files:** +- [src/services/ad-service.js](src/services/ad-service.js) - Generic service for all 20 element types +- [src/tools/ad-tools.js](src/tools/ad-tools.js) - 5 MCP tools for AD interaction + +### Available AD Tools + +1. **get_application_summary** - Shows cached element counts per type +2. **get_ad_elements** - Get all elements of a specific type (with limit) +3. **search_ad_elements** - Search elements by name/description/code +4. **get_ad_element_details** - Get full details of specific element +5. **list_ad_types** - List all 20 available element types + +### curl Testing + +All 17 working element types were validated with curl. See [AD_API_TEST_RESULTS.md](AD_API_TEST_RESULTS.md) for detailed results. + +**Test command:** +```powershell +powershell -ExecutionPolicy Bypass -File test-ad-api.ps1 +``` + +### Notes + +- **WorkflowAction** and **WritingModel** removed (404 Not Found on API) +- Page sizes optimized per type (Resource: 15000, Workflow: 5000, View: 200, others: 100000) +- Same cache management as workflows (1-hour TTL) + +## System Parameters (config-tools.js) + +The `get_system_parameters` tool exposes WMS configuration parameters. + +- The Reading model has **no `CommandParameterData` entity** — the correct entities + are `Parameter` (definition + `DefaultValue`) and `ParamValue` (per-warehouse + overrides, linked by `ParameterId`). +- The tool fetches both entities fully (small datasets — ~200 / ~50 rows), merges + them client-side, and reports the **effective value** per warehouse (override if + present, otherwise default). No LINQ string injection — all filters + (`warehouse`, `param_class`, `search`, `only_overridden`) are applied in JS. +- Files: [src/tools/config-tools.js](src/tools/config-tools.js). + +## Shipment Templates — scope note + +Requests for **shipment template execution history** are only partially served: + +- The `ShipmentTemplate` Reading entity (queryable via `query_wms_entities`) exposes + only the **last** execution (`LastExecuteDate`) plus `Status` / `IsEnabled`. +- The **full execution history** lives exclusively in server-side + `ApplyShipmentTemplates` text logs. Those logs are **not present on the reachable + host** (`10.255.255.2`) — they sit on customer production / ETL servers — so no + log-parsing tool was built. See the `wms://query-examples` resource for the + API-only recipes. + +## LINQ / QueryExecute gotchas (verified against live WMS) + +- **Relative dates fail:** `DateTime.Now`, `DateTime.Today`, `AddDays()` are NOT + translatable by the query engine. Use a literal `new DateTime(year, month, day)`. +- **`select_expression` is unreliable:** LINQ projections passed via the `Select` + API parameter raise compile errors. Prefer querying full rows. (Open issue.) +- The `ApplicationService.log` line format is: + `YYYY-MM-DD HH:MM:SS.ffff [thread] [Level] [Component] [message]`. + +## Removed code + +The project is **100% API-based**. Legacy direct-Oracle files +(`src/services/oracle-service.js`, `src/resources/database.js`, +`src/tools/database-tools.js`) were dead code (unwired, `oracledb` not even a +dependency) and have been **removed**. Do not reintroduce direct database access. + +## Future Enhancements + +1. **Caching:** Cache frequently accessed resources (workflow categories) +2. **Analytics:** Tool to analyze error patterns across logs + workflows +3. **Suggestions:** Tool to suggest fixes based on error analysis +4. **Metrics:** Performance monitoring and query statistics +5. **`select_expression` fix:** Investigate the `Select` API parameter compile errors diff --git a/IMPLEMENTATION_SUMMARY.md b/IMPLEMENTATION_SUMMARY.md new file mode 100644 index 0000000..38b239f --- /dev/null +++ b/IMPLEMENTATION_SUMMARY.md @@ -0,0 +1,215 @@ +# WMS MCP Server - Implementation Summary + +**Date:** 2026-04-02 +**Status:** ✅ **COMPLETE AND VALIDATED** + +## Overview + +Successfully implemented a comprehensive MCP (Model Context Protocol) server for the WMS (Warehouse Management System) with 100% API-based architecture. The server provides Claude Desktop with full access to WMS data, workflows, and Application Dictionary elements. + +## Implementation Highlights + +### ✅ Phase 1: Core Infrastructure +- **API Service:** OAuth 2.0 authentication with automatic token refresh +- **MCP Server:** Full MCP SDK implementation with resources and tools +- **Configuration:** Environment-based configuration with .env support +- **Error Handling:** Comprehensive error handling and logging + +### ✅ Phase 2: WMS APIs +- **Query API:** LINQ-based entity querying (12 entity types) +- **Command API:** WMS command execution +- **Workflow API:** Workflow fetching with lazy loading and caching + - Successfully validated: 3,712 workflows retrieved + +### ✅ Phase 3: Application Dictionary (NEW) +- **20 Element Types:** Commands, Queries, Dialogs, Views, Entities, Events, etc. +- **38,765 Total Elements:** Comprehensive coverage of application definitions +- **17/19 Types Validated:** curl testing confirmed API endpoints work +- **Lazy Loading + Cache:** Same pattern as workflows (1-hour TTL) + +## Test Results + +### curl Validation (Application Dictionary) + +| Status | Count | Percentage | +|--------|-------|------------| +| ✅ Working | 17 | 89.5% | +| ❌ Failed (404) | 2 | 10.5% | + +**Working Types:** +- Command (1,872) +- Query (2,016) +- Dialog (734) +- View (373) +- Entity (331) +- Event (1,980) +- FieldType (320) +- Hook (60) +- List (243) +- Record (337) +- Relationship (49) +- Report (67) +- Resource (29,374) ← Largest type +- Subscription (500) +- Validator (17) +- ViewGroup (180) +- Workflow (3,712) + +**Failed Types (Removed):** +- WorkflowAction (404 Not Found) +- WritingModel (404 Not Found) + +**Empty Types (Available):** +- Dashboard (0) +- TimelineTemplate (0) +- Toggle (0) + +## Files Created/Modified + +### Services +- ✅ `src/services/api-service.js` - OAuth + HTTP client +- ✅ `src/services/workflow-service.js` - Workflow fetching +- ✅ `src/services/ad-service.js` - **NEW: Application Dictionary service** +- ✅ `src/services/wms-query-service.js` - LINQ query builder +- ✅ `src/services/log-service.js` - Log file operations + +### Tools +- ✅ `src/tools/workflow-tools.js` - Workflow tools (3 tools) +- ✅ `src/tools/ad-tools.js` - **NEW: AD tools (5 tools)** +- ✅ `src/tools/wms-query-tools.js` - WMS query tools (3 tools) +- ✅ `src/tools/api-tools.js` - API tools (2 tools) +- ✅ `src/tools/log-tools.js` - Log tools (2 tools) + +### Resources +- ✅ `src/resources/wms-entities.js` - Entity catalog +- ✅ `src/resources/entity-schemas.js` - Schema documentation +- ✅ `src/resources/query-examples.js` - LINQ examples +- ✅ `src/resources/workflows.js` - Workflow overview +- ✅ `src/resources/apis.js` - API documentation +- ✅ `src/resources/logs.js` - Log guide + +### Core +- ✅ `src/index.js` - Main MCP server with AD integration +- ✅ `.env` - Environment configuration +- ✅ `package.json` - Dependencies + +### Documentation +- ✅ `CLAUDE.md` - Updated with AD implementation details +- ✅ `AD_API_TEST_RESULTS.md` - **NEW: Detailed curl test results** +- ✅ `test-ad-api.ps1` - **NEW: PowerShell test script** +- ✅ `IMPLEMENTATION_SUMMARY.md` - This file + +## Total MCP Tools Implemented + +| Category | Tool Count | Tool Names | +|----------|------------|------------| +| **Workflow** | 3 | search_workflows, get_workflow_details, list_workflow_categories | +| **AD Elements** | 5 | get_application_summary, get_ad_elements, search_ad_elements, get_ad_element_details, list_ad_types | +| **WMS Queries** | 3 | query_wms_entities, get_entity_schema, search_wms_data | +| **APIs** | 2 | call_query_api, execute_command | +| **Logs** | 2 | read_recent_logs, search_logs | +| **TOTAL** | **15** | | + +## Total MCP Resources Implemented + +1. `wms://entities` - WMS entity catalog +2. `wms://entity-schemas` - Entity schema details +3. `wms://query-examples` - LINQ query examples +4. `workflows://overview` - Workflow overview +5. `api://catalog` - API catalog +6. `logs://guide` - Log file guide + +**TOTAL: 6 resources** + +## Critical Fixes Applied + +### 1. dotenv stdout pollution +**Problem:** dotenv writes to stdout, breaking MCP protocol +**Solution:** Redirect stdout to stderr during dotenv loading + +### 2. Missing tenant_code +**Problem:** OAuth returns 400 Bad Request +**Solution:** Added `tenant_code: process.env.WMS_API_TENANT` to auth request + +### 3. API response structure +**Problem:** Code expected direct array, API returns `{entities: [...]}` +**Solution:** Extract entities: `response?.entities || []` + +### 4. Property name inconsistency +**Problem:** API returns both lowercase and uppercase properties +**Solution:** Support both: `e.name || e.Name` + +### 5. WorkflowAction & WritingModel 404 +**Problem:** Two AD element types return 404 Not Found +**Solution:** Removed from AD_ELEMENT_TYPES configuration + +## Performance Optimizations + +1. **Lazy Loading:** Data fetched only when needed (not at startup) +2. **Caching:** 1-hour TTL for all cached data +3. **Pagination:** High page sizes to minimize API calls + - Workflows: 5,000 per page + - Resource: 15,000 per page + - Others: 100,000 per page (usually single fetch) +4. **Property Access:** Flexible property name handling (lowercase/uppercase) + +## Architecture Achievements + +✅ **100% API-based:** No Oracle database dependency +✅ **OAuth 2.0:** Secure token-based authentication +✅ **Lazy Loading:** Minimal startup time +✅ **Caching:** Reduced API load +✅ **Error Resilient:** Comprehensive error handling +✅ **MCP Compliant:** Full protocol compliance +✅ **Validated:** curl testing confirmed functionality + +## Usage Examples + +### Query Workflows +``` +"Search for workflows containing 'Order'" +"Get details of workflow 'Helper_MasterOutboundOrderById'" +``` + +### Query AD Elements +``` +"Get all Command elements" +"Search Queries containing 'Load'" +"Get details of Dialog 'WorkStation_SelectDivision_V1'" +"Show me application summary" +``` + +### Query WMS Data +``` +"Query the last 10 products" +"Get schema for Products entity" +``` + +### Read Logs +``` +"Show me recent log entries" +"Search logs for 'error' keyword" +``` + +## Next Steps (Optional) + +1. **Deploy to Production VM:** Copy to `C:\WMS\mcp\` on server +2. **SSH Configuration:** Set up SSH for remote access from dev PC +3. **Build Executable:** Create standalone .exe with `pkg` +4. **Monitor Performance:** Track cache hit rates and API call frequency +5. **Expand Coverage:** Add more AD element type tools as needed + +## Conclusion + +The WMS MCP Server implementation is **complete, validated, and ready for use**. All 17 working Application Dictionary element types have been tested with curl and confirmed functional. The server successfully integrates with Claude Desktop, providing comprehensive access to WMS workflows, application definitions, runtime data, and logs through a clean MCP interface. + +**Total Coverage:** +- ✅ 15 MCP Tools +- ✅ 6 MCP Resources +- ✅ 5 API endpoints (Query, Command, Workflow, AD x20, OAuth) +- ✅ 20 AD element types (17 working, 3 empty) +- ✅ 38,765 AD elements accessible +- ✅ 3,712 workflows accessible +- ✅ 12 WMS entity types queryable + +The implementation exceeds the original requirements by adding comprehensive Application Dictionary support beyond the initial workflow-only scope. diff --git a/JANITOR_entities.json b/JANITOR_entities.json new file mode 100644 index 0000000..cf9c69c --- /dev/null +++ b/JANITOR_entities.json @@ -0,0 +1,129 @@ +{ + "entities": [ + { + "id": "Stock", + "name": "Stocks", + "displayName": "Stocks", + "component": "StockId", + "remove_command": "Mecalux.ITSW.EasyWMS.Modules.Contracts.Commands.StockRemoveCommand" + }, + { + "id": "Containers", + "name": "Containers", + "displayName": "Supports", + "component": "ComponentId", + "remove_command": "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.ContainerRemoveCommand" + }, + { + "id": "ProductLocations", + "name": "ProductLocations", + "displayName": "Emplacements picking dédiés", + "component": "ProductLocationId", + "remove_command": "Mecalux.ITSW.EasyWMS.Modules.Expeditions.Contracts.Commands.ProductLocationRemoveCommand" + }, + { + "id": "Tasks", + "name": "Tasks", + "displayName": "Tâches", + "component": "TaskId", + "remove_command": "Mecalux.ITSW.EasyWMS.Modules.Contracts.Commands.TaskRemoveCommand" + }, + { + "id": "Products", + "name": "Products", + "displayName": "Articles", + "component": "ProductId", + "remove_command": "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.ProductRemoveCommand" + }, + { + "id": "Accounts", + "name": "Accounts", + "displayName": "Clients", + "component": "AccountId", + "remove_command": "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.AccountRemoveCommand" + }, + { + "id": "Suppliers", + "name": "Suppliers", + "displayName": "Fournisseurs", + "component": "SupplierId", + "remove_command": "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.SupplierRemoveCommand" + }, + { + "id": "Kits", + "name": "Kits", + "displayName": "Kits", + "where1": "(z => z.IsEnable == true)", + "where1_name": "Kits actifs", + "btn1" : "Désactiver", + "component": "KitId", + "remove_command": "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.KitDeleteCommand", + "btn1_command": "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.KitDisableCommand" + }, + { + "id": "Aliases", + "name": "Aliases", + "displayName": "Alias", + "component": "AliasId", + "remove_command": "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.AliasRemoveCommand" + }, + { + "id": "InboundOrders", + "name": "InboundOrders", + "displayName": "Ordres d'entrée", + "component": "OutboundOrderId", + "remove_command": "Mecalux.ITSW.EasyWMS.Modules.Receptions.Contracts.Commands.InboundOrderRemoveCommand", + + "where1": "(z => z.InboundStatus == Mecalux.ITSW.EasyWMS.Modules.Common.Domain.InboundStatus.ReceptionPending)", + "where1_name" : "Réception en attente", + "btn1" : "Annuler", + "btn1_command" :"Mecalux.ITSW.EasyWMS.Modules.Receptions.Contracts.Commands.InboundOrderCancelCommandV2", + + "where2": "(z => z.InboundStatus == Mecalux.ITSW.EasyWMS.Modules.Common.Domain.InboundStatus.Receiving)", + "where2_name" : "Réception en cours", + + "where3": "(z => z.InboundStatus == Mecalux.ITSW.EasyWMS.Modules.Common.Domain.InboundStatus.Completed)", + "where3_name" : "Complété", + "btn3": "Fermer", + "btn3_command" : "Mecalux.ITSW.EasyWMS.Modules.Receptions.Contracts.Commands.InboundOrderClosingCommandV2", + + "where4": "(z => z.InboundStatus == Mecalux.ITSW.EasyWMS.Modules.Common.Domain.InboundStatus.PartiallyReceived)", + "where4_name" : "Reçu partiellement", + + "where5": "(z => z.InboundStatus == Mecalux.ITSW.EasyWMS.Modules.Common.Domain.InboundStatus.Cancelled)", + "where5_name" : "Annulé", + + "where6": "(z => z.InboundStatus == Mecalux.ITSW.EasyWMS.Modules.Common.Domain.InboundStatus.Closing)", + "where6_name" : "Fermeture" + + + }, + { + "id": "Receptions", + "name": "Receptions", + "displayName": "Réceptions", + "component": "ReceptionId", + "remove_command": "Mecalux.ITSW.EasyWMS.Modules.Receptions.Contracts.Commands.ReceptionRemoveCommand" + }, + { + "id": "OutboundOrders", + "name": "OutboundOrders", + "displayName": "Ordres de sortie", + "component": "OutboundOrderId", + "remove_command": "Mecalux.ITSW.EasyWMS.Modules.Expeditions.Contracts.Commands.OutboundOrderCancelCommand", + + "where1": "(z => z.OutboundOrderStatus == Mecalux.ITSW.EasyWMS.Modules.Common.Domain.OutboundOrderStatus.Creating)", + "where1_name" : "Création", + "btn1" : "Annuler", + "btn1_command" :"Mecalux.ITSW.EasyWMS.Modules.Expeditions.Contracts.Commands.OutboundOrderCancelCommand", + + "where2": "(z => z.OutboundOrderStatus == Mecalux.ITSW.EasyWMS.Modules.Common.Domain.OutboundOrderStatus.Waiting)", + "where2_name" : "En attente", + "btn2" : "Annuler", + "btn2_command" :"Mecalux.ITSW.EasyWMS.Modules.Expeditions.Contracts.Commands.OutboundOrderCancelCommand", + + "where3": "(z => z.OutboundOrderStatus == Mecalux.ITSW.EasyWMS.Modules.Common.Domain.OutboundOrderStatus.Release)", + "where3_name" : "Lancé" + } + ] +} \ No newline at end of file diff --git a/JANITOR_main.js b/JANITOR_main.js new file mode 100644 index 0000000..e26a55c --- /dev/null +++ b/JANITOR_main.js @@ -0,0 +1,1246 @@ +const { app, BrowserWindow, ipcMain } = require('electron') +const path = require('path') +const axios = require('axios') +const fs = require('fs') +const os = require('os') + +// Variable globale pour stocker les données de session +let sessionData = { + token: null, + refreshToken: null, + apiUrl: null, + userData: null, + tokenExpiresAt: null, + // Données pour le refresh automatique + authData: { + tenantCode: null, + username: null, + password: null // Note: stocker le mot de passe n'est pas idéal pour la sécurité + } +} + +// Chemin pour sauvegarder le token +const tokenFilePath = path.join(os.homedir(), '.janitor-session.json') + +// Charger les données de session depuis le fichier +function loadSessionData() { + try { + if (fs.existsSync(tokenFilePath)) { + const data = fs.readFileSync(tokenFilePath, 'utf8') + sessionData = JSON.parse(data) + console.log('Données de session chargées') + } + } catch (error) { + console.error('Erreur lors du chargement des données de session:', error) + } +} + +// Sauvegarder les données de session dans un fichier +function saveSessionData() { + try { + fs.writeFileSync(tokenFilePath, JSON.stringify(sessionData, null, 2)) + console.log('Données de session sauvegardées') + } catch (error) { + console.error('Erreur lors de la sauvegarde des données de session:', error) + } +} + +// Nettoyer les données de session +function clearSessionData() { + sessionData = { + token: null, + refreshToken: null, + apiUrl: null, + userData: null, + tokenExpiresAt: null, + authData: { + tenantCode: null, + username: null, + password: null + } + } + try { + if (fs.existsSync(tokenFilePath)) { + fs.unlinkSync(tokenFilePath) + console.log('Fichier de session supprimé') + } + } catch (error) { + console.error('Erreur lors de la suppression du fichier de session:', error) + } +} + +// Fonction pour faire le refresh du token +async function refreshToken() { + if (!sessionData.refreshToken || !sessionData.apiUrl) { + console.log('Pas de refresh token disponible') + return { success: false, message: 'Pas de refresh token disponible' } + } + + try { + // Préparer les données au format x-www-form-urlencoded + const params = new URLSearchParams() + params.append('grant_type', 'refresh_token') + params.append('refresh_token', sessionData.refreshToken) + params.append('forcerevoke', '1') // Optionnel selon la doc + + // Utiliser le même authString que pour l'authentification initiale + const authString = "R05BOklFNGU3aXFoZHQ=" + + // Préparer l'URL + let apiUrl = sessionData.apiUrl + if (apiUrl.startsWith('http://')) { + apiUrl = apiUrl.replace('http://', 'https://') + } else if (!apiUrl.startsWith('https://')) { + apiUrl = 'https://' + apiUrl + } + + console.log('Tentative de refresh du token...') + + // Faire l'appel API de refresh + const response = await axios.post( + `${apiUrl}/EasySTS/OAuth/Token`, + params, + { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'Authorization': `Basic ${authString}` + }, + timeout: 30000, + httpsAgent: new (require('https').Agent)({ + rejectUnauthorized: false + }) + } + ) + + console.log('Refresh réussi:', response.data) + + // Calculer la nouvelle date d'expiration + const expiresIn = response.data.expires_in || 3600 + const expiresAt = new Date(Date.now() + (expiresIn * 1000)) + + // Mettre à jour les données de session + sessionData.token = response.data.access_token || response.data.token + sessionData.refreshToken = response.data.refresh_token || sessionData.refreshToken // Garder l'ancien si pas de nouveau + sessionData.tokenExpiresAt = expiresAt + sessionData.userData = response.data + + // Sauvegarder la session mise à jour + saveSessionData() + + console.log('Token refreshé avec succès, expire le:', expiresAt) + + return { + success: true, + token: sessionData.token, + expiresAt: expiresAt, + message: 'Token refreshé avec succès' + } + + } catch (error) { + console.error('Erreur lors du refresh du token:', error) + + if (error.response) { + console.log('Détails de l\'erreur refresh:', error.response.data) + return { + success: false, + message: `Erreur refresh ${error.response.status}: ${error.response.data.message || error.response.data.error_description || 'Refresh échoué'}`, + error: error.response.data + } + } else if (error.request) { + return { + success: false, + message: 'Impossible de contacter le serveur pour le refresh', + error: 'Network error' + } + } else { + return { + success: false, + message: 'Erreur de configuration refresh', + error: error.message + } + } + } +} + +function createWindow() { + const win = new BrowserWindow({ + width: 1400, + height: 900, + icon: path.join(__dirname, 'images', 'logo.ico'), + autoHideMenuBar: true, + webPreferences: { + nodeIntegration: false, + contextIsolation: true, + preload: path.join(__dirname, 'preload.js') + } + }) + + win.loadFile('index.html') + return win +} + +// Fonction pour faire l'appel API d'authentification +async function authenticateUser(formData) { + try { + // Préparer les données au format x-www-form-urlencoded + const params = new URLSearchParams() + params.append('grant_type', 'password') + params.append('tenant_code', formData.tenantCode) + params.append('username', formData.user) + params.append('password', formData.password) + + // Utiliser l'authString fourni (avec le = manquant) + const authString = "R05BOklFNGU3aXFoZHQ=" + + console.log('Paramètres envoyés:', { + grant_type: 'password', + tenant_code: formData.tenantCode, + username: formData.user, + password: '***' // Masquer le mot de passe dans les logs + }) + + // Préparer l'URL pour l'appel API + let apiUrl = formData.url // CORRECTION: utiliser formData.url au lieu de data.url + // Forcer HTTPS quoi qu'il arrive + if (apiUrl.startsWith('http://')) { + apiUrl = apiUrl.replace('http://', 'https://') + } else if (!apiUrl.startsWith('https://')) { + apiUrl = 'https://' + apiUrl + } + console.log("apiUrl : "+ apiUrl) + // Faire l'appel API + const response = await axios.post( + `${apiUrl}/EasySTS/OAuth/Token`, // Endpoint corrigé + params, + { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'Authorization': `Basic ${authString}` + }, + timeout: 30000, // Timeout de 30 secondes + httpsAgent: new (require('https').Agent)({ + rejectUnauthorized: false // Ignore les certificats SSL non vérifiés + }) + } + ) + + console.log('Réponse API:', response.data) + + // Calculer la date d'expiration du token + const expiresIn = response.data.expires_in || 3600 // Par défaut 1 heure si non spécifié + const expiresAt = new Date(Date.now() + (expiresIn * 1000)) // Convertir en millisecondes + + return { + success: true, + token: response.data.access_token || response.data.token, + refreshToken: response.data.refresh_token, // Peut être undefined si pas fourni + expiresAt: expiresAt, + message: 'Authentification réussie', + data: response.data + } + + } catch (error) { + console.error('Erreur lors de l\'authentification:', error) + + if (error.response) { + // Le serveur a répondu avec un code d'erreur + console.log('Détails de l\'erreur:', error.response.data) + return { + success: false, + message: `Erreur ${error.response.status}: ${error.response.data.message || error.response.data.error_description || 'Authentification échouée'}`, + error: error.response.data + } + } else if (error.request) { + // La requête a été faite mais pas de réponse + return { + success: false, + message: 'Impossible de contacter le serveur', + error: 'Network error' + } + } else { + // Erreur dans la configuration de la requête + return { + success: false, + message: 'Erreur de configuration', + error: error.message + } + } + } +} + +// Écouter les données du formulaire +ipcMain.on('form-data', async (event, data) => { + console.log('Données reçues du formulaire:', { + url: data.url, + tenantCode: data.tenantCode, + user: data.user, + password: '***' // Masquer le mot de passe + }) + + // Valider les données + if (!data.url || !data.user || !data.password) { + event.reply('form-response', { + success: false, + message: 'Tous les champs sont requis' + }) + return + } + + // Valider l'URL (accepte les IPs et domaines) + try { + // Ajouter http:// si pas de protocole + let urlToTest = data.url + if (!urlToTest.startsWith('http://') && !urlToTest.startsWith('https://')) { + urlToTest = 'http://' + urlToTest + } + new URL(urlToTest) + } catch (e) { + event.reply('form-response', { + success: false, + message: 'URL invalide' + }) + return + } + + // Envoyer une réponse immédiate pour indiquer le traitement + event.reply('form-response', { + success: true, + message: 'Authentification en cours...', + loading: true + }) + + // Faire l'appel API + const authResult = await authenticateUser(data) + + // Envoyer le résultat final + event.reply('form-response', authResult) + + // Si l'authentification réussit, rediriger vers le dashboard + if (authResult.success && !authResult.loading) { + // Stocker les données de session + sessionData.token = authResult.token + sessionData.refreshToken = authResult.refreshToken + sessionData.apiUrl = data.url // Correction: utiliser data.url au lieu de formData.url + sessionData.userData = authResult.data + sessionData.tokenExpiresAt = authResult.expiresAt + + // Stocker les données d'authentification pour le refresh automatique + sessionData.authData.tenantCode = data.tenantCode + sessionData.authData.username = data.user + sessionData.authData.password = data.password // Note: pas idéal pour la sécurité + + // Sauvegarder la session + saveSessionData() + + console.log('Token expire le:', sessionData.tokenExpiresAt) + + // Attendre un petit délai pour que l'utilisateur voie le message de succès + setTimeout(() => { + const win = BrowserWindow.getFocusedWindow() + if (win) { + win.loadFile('dashboard.html') + } + }, 1000) // Délai d'1 seconde + } +}) + +app.whenReady().then(() => { + // Charger les données de session au démarrage + loadSessionData() + + createWindow() + + app.on('activate', () => { + if (BrowserWindow.getAllWindows().length === 0) { + createWindow() + } + }) +}) + +app.on('window-all-closed', () => { + if (process.platform !== 'darwin') { + app.quit() + } +}) + +// Fonction pour vérifier la validité du token et refresh automatique +async function verifyToken() { + if (!sessionData.token || !sessionData.tokenExpiresAt) { + return { valid: false, message: 'Aucun token trouvé' } + } + + // Vérifier si le token a expiré en comparant avec la date actuelle + const now = new Date() + const expiresAt = new Date(sessionData.tokenExpiresAt) + const timeRemaining = Math.floor((expiresAt - now) / 1000) // en secondes + + // Si le token expire dans moins de 3 minutes (180 secondes), essayer de le refresh + if (timeRemaining <= 180 && timeRemaining > 0) { + console.log(`Token expire dans ${timeRemaining} secondes, tentative de refresh...`) + + const refreshResult = await refreshToken() + if (refreshResult.success) { + console.log('Refresh automatique réussi') + // Recalculer le temps restant avec le nouveau token + const newExpiresAt = new Date(sessionData.tokenExpiresAt) + const newTimeRemaining = Math.floor((newExpiresAt - now) / 1000) + + return { + valid: true, + message: 'Token refreshé automatiquement', + expiresAt: newExpiresAt, + timeRemaining: newTimeRemaining, + refreshed: true + } + } else { + console.log('Échec du refresh automatique:', refreshResult.message) + // Le refresh a échoué, mais le token est peut-être encore valide pour quelques minutes + if (timeRemaining > 0) { + return { + valid: true, + message: `Token valide encore ${timeRemaining}s, refresh échoué`, + expiresAt: expiresAt, + timeRemaining: timeRemaining, + refreshFailed: true + } + } + } + } + + // Si le token a expiré + if (now >= expiresAt) { + console.log('Token expiré:', { + maintenant: now.toISOString(), + expiration: expiresAt.toISOString() + }) + return { valid: false, message: 'Token expiré' } + } + + // Token encore valide (plus de 3 minutes restantes) + console.log(`Token valide encore ${timeRemaining} secondes`) + + return { + valid: true, + message: 'Token valide', + expiresAt: expiresAt, + timeRemaining: timeRemaining + } +} + +// Écouter les demandes de vérification de token +ipcMain.handle('verify-token', async () => { + const result = await verifyToken() + + if (!result.valid) { + // Nettoyer les données de session + clearSessionData() + } + + return result +}) + +// Écouter les demandes de refresh forcé du token +ipcMain.handle('force-refresh-token', async () => { + try { + const result = await refreshToken() + return result + } catch (error) { + console.error('Erreur lors du refresh forcé:', error) + return { + success: false, + message: error.message + } + } +}) + +// Écouter les demandes de déconnexion +ipcMain.on('logout', () => { + // Nettoyer les données de session + clearSessionData() + + // Rediriger vers la page de connexion sans paramètre (session déjà nettoyée) + const win = BrowserWindow.getFocusedWindow() + if (win) { + win.loadFile('index.html') + } +}) + +// Écouter les demandes de redirection avec message d'erreur +ipcMain.on('show-token-expired', (event, message) => { + // Nettoyer les données de session + clearSessionData() + + // Rediriger vers la page de connexion avec message + const win = BrowserWindow.getFocusedWindow() + if (win) { + // Stocker le message pour l'afficher sur la page de connexion + win.webContents.once('dom-ready', () => { + win.webContents.executeJavaScript(` + window.tokenExpiredMessage = "${message}"; + `) + }) + win.loadFile('index.html') + } +}) + +// Fonction pour exécuter une query de count sur une entité +async function executeCountQuery(entityName, whereClause = null) { + if (!sessionData.token || !sessionData.apiUrl) { + throw new Error('Pas de token ou d\'URL API disponible') + } + + try { + let apiUrl = sessionData.apiUrl + if (apiUrl.startsWith('http://')) { + apiUrl = apiUrl.replace('http://', 'https://') + } else if (!apiUrl.startsWith('https://')) { + apiUrl = 'https://' + apiUrl + } + + // Construire l'expression avec ou sans clause where + let expression = `Context.${entityName}` + if (whereClause) { + expression += `.Where${whereClause}` + } + expression += '.Count()' + + const queryData = { + "Application": "EasyWMS", + "QueryType": 1, + "Expression": expression + } + + console.log(`Exécution query count pour ${entityName}${whereClause ? ' avec where' : ''}:`, queryData) + + const response = await axios.post( + `${apiUrl}/ApplicationService/api/QueryScalarExecute`, + queryData, + { + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${sessionData.token}` + }, + timeout: 30000, + httpsAgent: new (require('https').Agent)({ + rejectUnauthorized: false + }) + } + ) + + // Log de la réponse complète du serveur pour les WHERE personnalisés + if (whereClause) { + console.log('=== RÉPONSE SERVEUR COMPLÈTE ===') + console.log(`URL: ${apiUrl}/ApplicationService/api/QueryScalarExecute`) + console.log(`Query Data:`, queryData) + console.log(`Status: ${response.status}`) + console.log(`Headers:`, response.headers) + console.log(`Data:`, JSON.stringify(response.data, null, 2)) + console.log('===============================') + } + + // Extraire la valeur selon le format spécifié + const count = response.data.Rows?.[0]?.Values?.Column + + return { + success: true, + entity: entityName, + count: count || 0, + data: response.data + } + + } catch (error) { + console.error(`=== ERREUR EXECUTE COUNT QUERY ===`) + console.error(`Erreur lors du count ${entityName}${whereClause ? ' avec where' : ''}:`, error) + console.error(`Type d'erreur: ${error.name}`) + console.error(`Message: ${error.message}`) + console.error(`Stack: ${error.stack}`) + + if (error.response?.data) { + console.error('Détails erreur API:', error.response.data) + console.error('Status:', error.response.status) + console.error('Headers:', error.response.headers) + } + console.error('=================================') + + return { + success: false, + entity: entityName, + count: 0, + error: { + message: error.message, + response: error.response?.data, + status: error.response?.status, + stack: error.stack, + name: error.name + } + } + } +} + +// Fonction pour charger la liste des entités depuis le fichier JSON +function loadEntitiesList() { + try { + const entitiesPath = path.join(__dirname, 'entities.json') + const data = fs.readFileSync(entitiesPath, 'utf8') + const entitiesConfig = JSON.parse(data) + + // Trier les entités par ordre alphabétique sur le displayName + const sortedEntities = entitiesConfig.entities.sort((a, b) => + a.displayName.localeCompare(b.displayName) + ) + + return sortedEntities + } catch (error) { + console.error('Erreur lors du chargement des entités:', error) + // Fallback sur la liste hardcodée en cas d'erreur (triée alphabétiquement) + const fallbackEntities = [ + { id: "Accounts", name: "Accounts", displayName: "Accounts" }, + { id: "Aliases", name: "Aliases", displayName: "Aliases" }, + { id: "Containers", name: "Containers", displayName: "Containers" }, + { id: "InboundOrders", name: "InboundOrders", displayName: "Inbound Orders" }, + { id: "Kits", name: "Kits", displayName: "Kits" }, + { id: "OutboundOrders", name: "OutboundOrders", displayName: "Outbound Orders" }, + { id: "ProductLocations", name: "ProductLocations", displayName: "Product Locations" }, + { id: "Products", name: "Products", displayName: "Products" }, + { id: "Receptions", name: "Receptions", displayName: "Receptions" }, + { id: "Stocks", name: "Stocks", displayName: "Stocks" }, + { id: "Suppliers", name: "Suppliers", displayName: "Suppliers" }, + { id: "Tasks", name: "Tasks", displayName: "Tasks" } + ] + + return fallbackEntities + } +} + +// Fonction pour récupérer tous les counts +async function getAllEntityCounts() { + const entities = loadEntitiesList() + const results = {} + + // Créer la liste de toutes les queries à exécuter (entité principale + where clauses) + const queries = [] + + entities.forEach(entity => { + // Query principale + queries.push({ + entity: entity, + key: entity.name, + whereClause: null + }) + + // Queries pour les clauses where + let whereIndex = 1 + while (entity[`where${whereIndex}`]) { + queries.push({ + entity: entity, + key: `${entity.name}-where${whereIndex}`, + whereClause: entity[`where${whereIndex}`] + }) + whereIndex++ + } + }) + + // Exécuter toutes les queries en parallèle + const promises = queries.map(query => executeCountQuery(query.entity.name, query.whereClause)) + const responses = await Promise.allSettled(promises) + + responses.forEach((response, index) => { + const query = queries[index] + const entity = query.entity + + if (response.status === 'fulfilled') { + results[query.key] = { + ...response.value, + displayName: entity.displayName, + description: entity.description + } + } else { + results[query.key] = { + success: false, + entity: entity.name, + displayName: entity.displayName, + description: entity.description, + count: 0, + error: response.reason?.message || 'Erreur inconnue' + } + } + }) + + return results +} + +// Écouter les demandes de count d'entités +ipcMain.handle('get-entity-counts', async () => { + try { + // Vérifier d'abord que le token est valide + const tokenCheck = await verifyToken() + if (!tokenCheck.valid) { + return { + success: false, + error: 'Token invalide ou expiré' + } + } + + const counts = await getAllEntityCounts() + return { + success: true, + counts: counts, + timestamp: new Date().toISOString() + } + + } catch (error) { + console.error('Erreur lors de la récupération des counts:', error) + return { + success: false, + error: error.message + } + } +}) + +// Écouter les demandes de la liste des entités +ipcMain.handle('get-entities-list', () => { + try { + const entities = loadEntitiesList() + return { + success: true, + entities: entities + } + } catch (error) { + console.error('Erreur lors de la récupération de la liste des entités:', error) + return { + success: false, + error: error.message, + entities: [] + } + } +}) + +// Écouter les demandes de count personnalisées +ipcMain.handle('execute-custom-count', async (event, entityName, whereClause) => { + try { + console.log('=== IPC CUSTOM COUNT ===') + console.log(`Entité: ${entityName}`) + console.log(`Clause WHERE: ${whereClause}`) + + // Vérifier d'abord que le token est valide + const tokenCheck = await verifyToken() + if (!tokenCheck.valid) { + console.log('Token invalide, arrêt du processus') + return { + success: false, + error: 'Token invalide ou expiré' + } + } + + console.log('Token valide, exécution de la query...') + const result = await executeCountQuery(entityName, whereClause) + console.log('Résultat de executeCountQuery:', result) + console.log('=====================') + + return result + + } catch (error) { + console.error('=== ERREUR IPC CUSTOM COUNT ===') + console.error('Erreur lors de l\'exécution du count personnalisé:', error) + console.error('Stack:', error.stack) + console.error('==============================') + + return { + success: false, + error: { + message: error.message, + stack: error.stack, + name: error.name + } + } + } +}) + +// Écouter les demandes de récupération des IDs avec filtre WHERE personnalisé +ipcMain.handle('get-filtered-entity-ids', async (event, entityName, component, whereClause) => { + try { + // Vérifier d'abord que le token est valide + const tokenCheck = await verifyToken() + if (!tokenCheck.valid) { + return { + success: false, + error: 'Token invalide ou expiré', + ids: [] + } + } + + const result = await getEntityIds(entityName, component, null, whereClause) + return result + + } catch (error) { + console.error('Erreur lors de la récupération des IDs filtrés:', error) + return { + success: false, + error: error.message, + ids: [] + } + } +}) + +// Écouter les demandes d'informations de session +ipcMain.handle('get-session-info', () => { + try { + return { + success: true, + apiUrl: sessionData.apiUrl || null, + tenantCode: sessionData.authData.tenantCode || null, + username: sessionData.authData.username || null + } + } catch (error) { + console.error('Erreur lors de la récupération des infos de session:', error) + return { + success: false, + error: error.message + } + } +}) + +// Fonction pour récupérer les IDs d'une entité +async function getEntityIds(entityName, component, whereIndex = null, customWhereClause = null) { + if (!sessionData.token || !sessionData.apiUrl) { + throw new Error('Pas de token ou d\'URL API disponible') + } + + try { + let apiUrl = sessionData.apiUrl + if (apiUrl.startsWith('http://')) { + apiUrl = apiUrl.replace('http://', 'https://') + } else if (!apiUrl.startsWith('https://')) { + apiUrl = 'https://' + apiUrl + } + + // Construire l'expression avec ou sans clause where + let expression = `Context.${entityName}` + + // Si customWhereClause est spécifié, l'utiliser en priorité + if (customWhereClause) { + expression += `.Where${customWhereClause}` + } + // Sinon, si whereIndex est spécifié, ajouter la clause where correspondante + else if (whereIndex && whereIndex > 0) { + const entities = loadEntitiesList() + const entity = entities.find(e => e.name === entityName) + if (entity && entity[`where${whereIndex}`]) { + expression += `.Where${entity[`where${whereIndex}`]}` + } + } + + expression += '.Select(z => z.Id)' + + const queryData = { + "Application": "EasyWMS", + "QueryType": 1, + "Expression": expression + } + + console.log(`Récupération des IDs pour ${entityName}:`, queryData) + + const response = await axios.post( + `${apiUrl}/ApplicationService/api/QueryExecute`, + queryData, + { + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${sessionData.token}` + }, + timeout: 30000, // Timeout plus long pour les requêtes de suppression + httpsAgent: new (require('https').Agent)({ + rejectUnauthorized: false + }) + } + ) + + console.log(`Réponse IDs ${entityName}:`, response.data) + + // Extraire les IDs depuis la réponse + const ids = [] + if (response.data.Table && response.data.Table.Rows && Array.isArray(response.data.Table.Rows)) { + response.data.Table.Rows.forEach(row => { + if (row.Values && row.Values.Column !== undefined && row.Values.Column !== null) { + ids.push(row.Values.Column) + } + }) + } + + return { + success: true, + ids: ids, + count: ids.length + } + + } catch (error) { + console.error(`Erreur lors de la récupération des IDs ${entityName}:`, error) + + return { + success: false, + ids: [], + error: error.response?.data?.message || error.message + } + } +} + +// Fonction pour récupérer toutes les données d'une entité pour l'export +async function getEntityExportData(entityName, component, customWhereClause = null) { + if (!sessionData.token || !sessionData.apiUrl) { + throw new Error('Pas de token ou d\'URL API disponible') + } + + try { + let apiUrl = sessionData.apiUrl + if (apiUrl.startsWith('http://')) { + apiUrl = apiUrl.replace('http://', 'https://') + } else if (!apiUrl.startsWith('https://')) { + apiUrl = 'https://' + apiUrl + } + + // Construire l'expression pour récupérer toutes les données (pas juste les IDs) + let expression = `Context.${entityName}` + + // Si customWhereClause est spécifié, l'utiliser + if (customWhereClause) { + expression += `.Where${customWhereClause}` + } + + // Pas de .Select() pour récupérer toutes les colonnes + + const queryData = { + "Application": "EasyWMS", + "QueryType": 1, + "Expression": expression + } + + console.log(`Récupération des données d'export pour ${entityName}:`, queryData) + + const response = await axios.post( + `${apiUrl}/ApplicationService/api/QueryExecute`, + queryData, + { + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${sessionData.token}` + }, + timeout: 60000, // Timeout plus long pour les exports + httpsAgent: new (require('https').Agent)({ + rejectUnauthorized: false + }) + } + ) + + console.log(`Réponse données d'export ${entityName}:`, response.data) + + // Extraire les données depuis la réponse + const data = [] + if (response.data.Table && response.data.Table.Rows && Array.isArray(response.data.Table.Rows)) { + const columns = response.data.Table.Columns || [] + + response.data.Table.Rows.forEach(row => { + const rowData = {} + if (row.Values && typeof row.Values === 'object') { + // Si row.Values est un objet, itérer sur ses propriétés + for (const [key, value] of Object.entries(row.Values)) { + rowData[key] = value + } + } else if (Array.isArray(row.Values)) { + // Si row.Values est un tableau, mapper avec les noms de colonnes + columns.forEach((column, index) => { + rowData[column.Name || `Column${index}`] = row.Values[index] + }) + } + data.push(rowData) + }) + } + + return { + success: true, + data: data, + count: data.length + } + + } catch (error) { + console.error(`Erreur lors de la récupération des données d'export ${entityName}:`, error) + + return { + success: false, + data: [], + error: error.response?.data?.message || error.message + } + } +} + +// Fonction pour supprimer un élément d'une entité +async function deleteEntityItem(entity, itemId) { + if (!sessionData.token || !sessionData.apiUrl) { + throw new Error('Pas de token ou d\'URL API disponible') + } + + try { + let apiUrl = sessionData.apiUrl + if (apiUrl.startsWith('http://')) { + apiUrl = apiUrl.replace('http://', 'https://') + } else if (!apiUrl.startsWith('https://')) { + apiUrl = 'https://' + apiUrl + } + + // Construire la commande de suppression + const commandData = [{ + "Name": `${entity.remove_command}, Mecalux.ITSW.EasyWMS.Modules.Contracts`, + "Properties": { + [entity.component]: itemId + } + }] + + // Ajouter ForceDeletionOfEmptyHolderContainer si c'est un ComponentId + if (entity.component === 'ComponentId') { + commandData[0].Properties.ForceDeletionOfEmptyHolderContainer = true + } + + console.log(`Suppression de l'élément ${itemId} pour ${entity.name}:`, commandData) + + const response = await axios.post( + `${apiUrl}/ApplicationService/api/CommandExecute`, + commandData, + { + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${sessionData.token}` + }, + timeout: 30000, + httpsAgent: new (require('https').Agent)({ + rejectUnauthorized: false + }) + } + ) + + console.log(`Réponse suppression ${entity.name} ID ${itemId}:`, response.data) + + return { + success: true, + itemId: itemId, + response: response.data + } + + } catch (error) { + console.error(`Erreur lors de la suppression ${entity.name} ID ${itemId}:`, error) + + let errorMessage = error.message + + // Extraire le message d'erreur depuis la réponse du serveur + if (error.response && error.response.data) { + try { + // Si c'est une string JSON, la parser + let errorData = error.response.data + if (typeof errorData === 'string') { + // Cas où il peut y avoir plusieurs objets JSON concaténés + const jsonMatch = errorData.match(/\{[^}]*"Message":"([^"]*)"[^}]*\}/) + if (jsonMatch) { + errorMessage = jsonMatch[1] + } else { + errorData = JSON.parse(errorData) + errorMessage = errorData.Message || errorData.message || errorMessage + } + } else if (errorData.Message) { + // Si c'est déjà un objet avec le champ Message + errorMessage = errorData.Message + } else if (errorData.message) { + errorMessage = errorData.message + } + } catch (parseError) { + console.error('Erreur lors du parsing de la réponse d\'erreur:', parseError) + // Garder le message d'erreur original si le parsing échoue + } + } + + return { + success: false, + itemId: itemId, + error: errorMessage + } + } +} + +// Écouter les demandes de récupération des IDs +ipcMain.handle('get-entity-ids', async (event, entityName, component, whereIndex = null) => { + try { + // Vérifier d'abord que le token est valide + const tokenCheck = await verifyToken() + if (!tokenCheck.valid) { + return { + success: false, + error: 'Token invalide ou expiré', + ids: [] + } + } + + const result = await getEntityIds(entityName, component, whereIndex) + return result + + } catch (error) { + console.error('Erreur lors de la récupération des IDs:', error) + return { + success: false, + error: error.message, + ids: [] + } + } +}) + +// Handler pour récupérer les données d'export d'une entité +ipcMain.handle('get-entity-export-data', async (event, entityName, component, whereClause = null) => { + try { + // Vérifier d'abord que le token est valide + const tokenCheck = await verifyToken() + if (!tokenCheck.valid) { + return { + success: false, + error: 'Token invalide ou expiré', + data: [] + } + } + + const result = await getEntityExportData(entityName, component, whereClause) + return result + + } catch (error) { + console.error('Erreur lors de la récupération des données d\'export:', error) + return { + success: false, + error: error.message, + data: [] + } + } +}) + +// Écouter les demandes de suppression d'éléments +ipcMain.handle('delete-entity-item', async (event, entity, itemId) => { + try { + // Vérifier d'abord que le token est valide + const tokenCheck = await verifyToken() + if (!tokenCheck.valid) { + return { + success: false, + error: 'Token invalide ou expiré' + } + } + + const result = await deleteEntityItem(entity, itemId) + return result + + } catch (error) { + console.error('Erreur lors de la suppression de l\'élément:', error) + return { + success: false, + error: error.message + } + } +}) + +// Fonction pour exécuter une action btn1 sur un élément d'une entité +async function executeBtn1EntityAction(entity, itemId) { + if (!sessionData.token || !sessionData.apiUrl) { + throw new Error('Pas de token ou d\'URL API disponible') + } + + try { + let apiUrl = sessionData.apiUrl + if (apiUrl.startsWith('http://')) { + apiUrl = apiUrl.replace('http://', 'https://') + } else if (!apiUrl.startsWith('https://')) { + apiUrl = 'https://' + apiUrl + } + + // Construire la commande btn1 + const commandData = [{ + "Name": `${entity.btn1_command}, Mecalux.ITSW.EasyWMS.Modules.Contracts`, + "Properties": { + [entity.component]: itemId + } + }] + + console.log(`Exécution ${entity.btn1} de l'élément ${itemId} pour ${entity.name}:`, commandData) + + const response = await axios.post( + `${apiUrl}/ApplicationService/api/CommandExecute`, + commandData, + { + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Bearer ${sessionData.token}` + }, + timeout: 30000, + httpsAgent: new (require('https').Agent)({ + rejectUnauthorized: false + }) + } + ) + + console.log(`Réponse ${entity.btn1} ${entity.name} ID ${itemId}:`, response.data) + + return { + success: true, + itemId: itemId, + response: response.data + } + + } catch (error) { + console.error(`Erreur lors de ${entity.btn1} ${entity.name} ID ${itemId}:`, error) + + let errorMessage = error.message + + // Extraire le message d'erreur depuis la réponse du serveur + if (error.response && error.response.data) { + try { + let errorData = error.response.data + if (typeof errorData === 'string') { + const jsonMatch = errorData.match(/\{[^}]*"Message":"([^"]*)"[^}]*\}/) + if (jsonMatch) { + errorMessage = jsonMatch[1] + } else { + errorData = JSON.parse(errorData) + errorMessage = errorData.Message || errorData.message || errorMessage + } + } else if (errorData.Message) { + errorMessage = errorData.Message + } else if (errorData.message) { + errorMessage = errorData.message + } + } catch (parseError) { + console.error('Erreur lors du parsing de la réponse d\'erreur:', parseError) + } + } + + return { + success: false, + itemId: itemId, + error: errorMessage + } + } +} + +// Écouter les demandes d'exécution d'actions btn1 +ipcMain.handle('execute-btn1-action', async (event, entity, itemId) => { + try { + // Vérifier d'abord que le token est valide + const tokenCheck = await verifyToken() + if (!tokenCheck.valid) { + return { + success: false, + error: 'Token invalide ou expiré' + } + } + + const result = await executeBtn1EntityAction(entity, itemId) + return result + + } catch (error) { + console.error('Erreur lors de l\'exécution de l\'action btn1:', error) + return { + success: false, + error: error.message + } + } +}) \ No newline at end of file diff --git a/POST apiQueryExecute.md b/POST apiQueryExecute.md new file mode 100644 index 0000000..25a2f40 --- /dev/null +++ b/POST apiQueryExecute.md @@ -0,0 +1,227 @@ +## Request Information + +### URI Parameters + +None. + +### Body Parameters + +[QueryExecute](https://10.255.255.2/ApplicationService/Help/ResourceModel?modelName=QueryExecute) + +| Name | Description | Type | Additional information | +| --- | --- | --- | --- | +| Application | +Application name. + + | String | + +None. + + | +| ClientModule | + +Client module that executes the query. + + | String | + +None. + + | +| QueryType | + +Type of the query. + + | [QueryContextType](https://10.255.255.2/ApplicationService/Help/ResourceModel?modelName=QueryContextType) | + +Default: Reading + + | +| Expression | + +Query expression. + + | String | + +None. + + | +| OrderBy | + +Order by to be applied to the expression. + + | String | + +None. + + | +| Select | + +Select to be applied to the expression. + + | String | + +None. + + | +| Skip | + +Skip to be applied to the expression. + + | Int32 | + +None. + + | +| Take | + +Take to be applied to the expression. + + | Int32 | + +None. + + | +| Parameters | + +Dictionary with the parameters and their values for the query. + + | Dictionary of String \[key\] and [QueryParameterValue](https://10.255.255.2/ApplicationService/Help/ResourceModel?modelName=QueryParameterValue) \[value\] | + +None. + + | +| InlineCount | + +Indicate if an inline count must be done to the query. + + | Boolean | + +None. + + | +| CommandTimeout | + +Gets or sets the command/query timeout. + + | Int32? | + +None. + + | +| QueryId | + +Gets or sets the query execution identifier. + + | Guid? | + +None. + + | + +### Request Formats + +**Sample:** + +``` +{ + "Application": "sample string 1", + "ClientModule": "sample string 2", + "QueryType": 0, + "Expression": "sample string 3", + "OrderBy": "sample string 4", + "Select": "sample string 5", + "Skip": 6, + "Take": 7, + "Parameters": { + "sample string 1": { + "TypeName": "sample string 1", + "Value": {} + }, + "sample string 2": { + "TypeName": "sample string 1", + "Value": {} + } + }, + "InlineCount": true, + "CommandTimeout": 1, + "QueryId": "e57b9e2d-1ba9-42c7-a035-fe964ce53fd6" +} + +``` + +**Sample:** + +Sample not available. + +**Sample:** + +``` +Binary JSON content. See http://bsonspec.org for details. + +``` + +## Response Information + +### Resource Description + +[QueryResultData](https://10.255.255.2/ApplicationService/Help/ResourceModel?modelName=QueryResultData) + +| Name | Description | Type | Additional information | +| --- | --- | --- | --- | +| InLineCount | +Gets or sets the in line count. + + | Int32 | + +None. + + | +| Table | + +Gets or sets the table. + + | [QueryTable](https://10.255.255.2/ApplicationService/Help/ResourceModel?modelName=QueryTable) | + +None. + + | + +### Response Formats + +**Sample:** + +``` +{ + "InLineCount": 1, + "Table": { + "TableName": "sample string 1", + "Columns": [ + { + "ColumnName": "sample string 1", + "TypeName": "sample string 2" + }, + { + "ColumnName": "sample string 1", + "TypeName": "sample string 2" + } + ], + "Rows": [ + null, + { + "Values": { + "sample string 1": {}, + "sample string 3": {} + } + } + ] + } +} + +``` + +**Sample:** + +``` +Binary JSON content. See http://bsonspec.org for details. + +``` \ No newline at end of file diff --git a/claude_desktop_config_ssh.json b/claude_desktop_config_ssh.json new file mode 100644 index 0000000..268caa1 --- /dev/null +++ b/claude_desktop_config_ssh.json @@ -0,0 +1,39 @@ +{ + "mcpServers": { + "wms": { + "command": "ssh", + "args": [ + "wms-vm", + "C:\\Users\\mecalux\\Desktop\\wms-mcp-server\\dist\\wms-mcp-server.exe" + ], + "env": { + "ORACLE_USER": "db_read", + "ORACLE_PASSWORD": "PF9.43uAq17$U", + "ORACLE_CONNECTION_STRING": "localhost:1521/orcl", + "ORACLE_USER_WORKFLOWS": "db_ad", + "ORACLE_PASSWORD_WORKFLOWS": "PF9.43uAq17$U", + "ORACLE_CONNECTION_STRING_WORKFLOWS": "localhost:1521/orcl", + "WORKFLOWS_TABLE": "AD_WFPROCESSES", + "DOCS_PATH": "C:\\Users\\mecalux\\Desktop\\wms-mcp-server\\docs", + "LOGS_PATH": "C:\\inetpub\\logs\\LogFiles\\Mecalux;C:\\ProgramData\\Mecalux\\ETLLogs", + "LOG_FILE_PATTERN": "*.log", + "API_DEFINITIONS_TABLE": "API_DEFINITIONS", + "WMS_API_BASE_URL": "https://localhost/ApplicationService/api", + "WMS_API_TOKEN_URL": "https://localhost/EasySTS/OAuth/Token", + "WMS_API_AUTH": "Basic R05BOklFNGU3aXFoZHQ=", + "WMS_API_TENANT": "AD", + "WMS_API_USERNAME": "mecalux", + "WMS_API_PASSWORD": "ANDREZmlx6", + "TOKEN_REFRESH_THRESHOLD": "1000", + "TOKEN_MAX_AGE": "1190", + "MAX_QUERY_ROWS": "1000", + "QUERY_TIMEOUT": "30000", + "NODE_TLS_REJECT_UNAUTHORIZED": "0" + } + } + }, + "preferences": { + "coworkScheduledTasksEnabled": false, + "sidebarMode": "chat" + } +} diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..52e7cf3 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,41 @@ +# Documentation WMS + +Bienvenue dans la documentation du WMS ! + +## Comment utiliser cette documentation + +Cette documentation est automatiquement accessible via le serveur MCP. Claude peut lire tous les fichiers `.md` présents dans ce dossier et ses sous-dossiers. + +## Organisation + +Organisez vos fichiers de documentation comme vous le souhaitez : + +``` +docs/ +├── README.md (ce fichier) +├── getting-started.md (guide de démarrage) +├── api/ +│ ├── overview.md +│ └── endpoints.md +├── workflows/ +│ ├── reception.md +│ └── expedition.md +└── troubleshooting/ + └── common-errors.md +``` + +## Comment ajouter de la documentation + +1. Créez vos fichiers `.md` dans ce dossier ou dans des sous-dossiers +2. Redémarrez Claude Desktop +3. Claude pourra automatiquement lire tous vos fichiers de documentation + +## Accéder à la documentation depuis Claude + +Dans Claude Desktop, vous pouvez demander : + +- "Montre-moi le sommaire de la documentation" +- "Lis la documentation sur les workflows" +- "Affiche-moi la documentation de l'API" + +Claude aura accès à tous les fichiers `.md` présents ici ! diff --git a/docs/api/Application Service API Reference.md b/docs/api/Application Service API Reference.md new file mode 100644 index 0000000..28b5273 --- /dev/null +++ b/docs/api/Application Service API Reference.md @@ -0,0 +1,669 @@ +## Application + +| API | Description | +| --- | --- | +| [GET api/application/apiversion](https://10.255.255.2/ApplicationService/Help/Api/GET-api-application-apiversion) | +No documentation available. + + | +| [GET api/application/apichangelog](https://10.255.255.2/ApplicationService/Help/Api/GET-api-application-apichangelog) | + +No documentation available. + + | +| [POST api/application/GetResources](https://10.255.255.2/ApplicationService/Help/Api/POST-api-application-GetResources) | + +No documentation available. + + | + +## CommandExecute + +| API | Description | +| --- | --- | +| [POST api/CommandExecute](https://10.255.255.2/ApplicationService/Help/Api/POST-api-CommandExecute) | +No documentation available. + + | + +## CommandFiles + +| API | Description | +| --- | --- | +| [POST api/CommandUploadFile](https://10.255.255.2/ApplicationService/Help/Api/POST-api-CommandUploadFile) | +No documentation available. + + | +| [GET api/CommandDownloadFile?fileCode={fileCode}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-CommandDownloadFile_fileCode) | + +No documentation available. + + | + +## Configuration + +| API | Description | +| --- | --- | +| [GET api/configuration/apiversion](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-apiversion) | +No documentation available. + + | +| [GET api/configuration/apichangelog](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-apichangelog) | + +No documentation available. + + | +| [POST api/configuration/updateorganization](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateorganization) | + +No documentation available. + + | +| [POST api/configuration/updateusergroups](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateusergroups) | + +No documentation available. + + | +| [POST api/configuration/updaterfmenuitems](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updaterfmenuitems) | + +No documentation available. + + | +| [POST api/configuration/updatejobs](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatejobs) | + +No documentation available. + + | +| [POST api/configuration/stopjobs](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-stopjobs) | + +No documentation available. + + | +| [POST api/configuration/startjobs](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-startjobs) | + +No documentation available. + + | +| [POST api/configuration/executejob](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-executejob) | + +No documentation available. + + | +| [POST api/configuration/updatesubscriptions](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatesubscriptions) | + +No documentation available. + + | +| [POST api/configuration/updatetimelinetemplates](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatetimelinetemplates) | + +No documentation available. + + | +| [POST api/configuration/updatetypes](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatetypes) | + +No documentation available. + + | +| [POST api/configuration/updateprocesses](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateprocesses) | + +No documentation available. + + | +| [POST api/configuration/updatequeries](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatequeries) | + +No documentation available. + + | +| [POST api/configuration/updateDataWarehouseContext](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateDataWarehouseContext) | + +No documentation available. + + | +| [POST api/configuration/updateresources](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateresources) | + +No documentation available. + + | +| [POST api/configuration/updateapplication](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateapplication) | + +No documentation available. + + | +| [POST api/configuration/updateapplications](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateapplications) | + +No documentation available. + + | +| [POST api/configuration/updatelicense](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatelicense) | + +No documentation available. + + | +| [POST api/configuration/updatehooks](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updatehooks) | + +No documentation available. + + | +| [POST api/configuration/updategenericsearch](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updategenericsearch) | + +No documentation available. + + | +| [POST api/configuration/undoLatestMigration?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-undoLatestMigration_applicationName) | + +No documentation available. + + | +| [POST api/configuration/enableapplication?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-enableapplication_applicationName) | + +No documentation available. + + | +| [POST api/configuration/disableapplication?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-disableapplication_applicationName) | + +No documentation available. + + | +| [POST api/configuration/enabletelemetry](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-enabletelemetry) | + +No documentation available. + + | +| [POST api/configuration/disabletelemetry](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-disabletelemetry) | + +No documentation available. + + | +| [GET api/configuration/tenant](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-tenant) | + +No documentation available. + + | +| [POST api/configuration/enablefeature](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-enablefeature) | + +No documentation available. + + | +| [POST api/configuration/disablefeature](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-disablefeature) | + +No documentation available. + + | +| [POST api/configuration/getfeature](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-getfeature) | + +No documentation available. + + | +| [GET api/configuration/applications](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-applications) | + +No documentation available. + + | +| [GET api/configuration/applicationFeatures?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-applicationFeatures_applicationName) | + +No documentation available. + + | +| [GET api/configuration/tenants](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-tenants) | + +No documentation available. + + | +| [GET api/configuration/tenantinfo?tenantCode={tenantCode}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-tenantinfo_tenantCode) | + +No documentation available. + + | +| [GET api/configuration/serviceinfo](https://10.255.255.2/ApplicationService/Help/Api/GET-api-configuration-serviceinfo) | + +No documentation available. + + | +| [POST api/configuration/updateservicemode](https://10.255.255.2/ApplicationService/Help/Api/POST-api-configuration-updateservicemode) | + +No documentation available. + + | + +## Events + +| API | Description | +| --- | --- | +| [POST api/PublishEvents](https://10.255.255.2/ApplicationService/Help/Api/POST-api-PublishEvents) | +No documentation available. + + | + +## GatewayCommit + +| API | Description | +| --- | --- | +| [POST api/GatewayCommit](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayCommit) | +No documentation available. + + | + +## GatewayExecuteCommand + +| API | Description | +| --- | --- | +| [POST api/GatewayExecuteCommand](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayExecuteCommand) | +No documentation available. + + | + +## GatewayExecuteCustomCommand + +| API | Description | +| --- | --- | +| [POST api/GatewayExecuteCustomCommand](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayExecuteCustomCommand) | +No documentation available. + + | + +## GatewayReject + +| API | Description | +| --- | --- | +| [POST api/GatewayReject](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayReject) | +No documentation available. + + | + +## GatewayRollback + +| API | Description | +| --- | --- | +| [POST api/GatewayRollback](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayRollback) | +No documentation available. + + | + +## GatewayUpdateRoutes + +| API | Description | +| --- | --- | +| [POST api/GatewayUpdateRoutes](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayUpdateRoutes) | +No documentation available. + + | + +## GatewayUpdateStations + +| API | Description | +| --- | --- | +| [POST api/GatewayUpdateStations](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GatewayUpdateStations) | +No documentation available. + + | + +## GenericSearch + +Generic Search Controller. + +| API | Description | +| --- | --- | +| [POST api/GenericSearch/Search](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GenericSearch-Search) | +Searches the specified documents. + + | +| [POST api/GenericSearch/Document](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GenericSearch-Document) | + +Gets the specified category document. + + | +| [GET api/GenericSearch/Categories?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-GenericSearch-Categories_applicationName) | + +Gets the categories. + + | +| [POST api/GenericSearch/Categories?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/POST-api-GenericSearch-Categories_applicationName) | + +Gets the categories. + + | + +## Health + +| API | Description | +| --- | --- | +| [GET api/healthcheck?tenantCode={tenantCode}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-healthcheck_tenantCode) | +No documentation available. + + | +| [POST api/healthcheck?tenantCode={tenantCode}](https://10.255.255.2/ApplicationService/Help/Api/POST-api-healthcheck_tenantCode) | + +No documentation available. + + | +| [GET api/ready?tenantCode={tenantCode}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-ready_tenantCode) | + +No documentation available. + + | + +## Metadata + +| API | Description | +| --- | --- | +| [GET api/Metadata/Commands](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Commands) | +No documentation available. + + | +| [GET api/Metadata/Commands?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Commands_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/CommandProperties?assemblyFullName={assemblyFullName}&fullName={fullName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-CommandProperties_assemblyFullName_fullName) | + +No documentation available. + + | +| [GET api/Metadata/CommandsAll](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-CommandsAll) | + +No documentation available. + + | +| [GET api/Metadata/CommandsAll?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-CommandsAll_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/Entities](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Entities) | + +No documentation available. + + | +| [GET api/Metadata/Entities?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Entities_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/EntityProperties?assemblyFullName={assemblyFullName}&fullName={fullName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-EntityProperties_assemblyFullName_fullName) | + +No documentation available. + + | +| [GET api/Metadata/EntitiesAll](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-EntitiesAll) | + +No documentation available. + + | +| [GET api/Metadata/EntitiesAll?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-EntitiesAll_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/Events](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Events) | + +No documentation available. + + | +| [GET api/Metadata/Events?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Events_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/EventProperties?assemblyFullName={assemblyFullName}&fullName={fullName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-EventProperties_assemblyFullName_fullName) | + +No documentation available. + + | +| [GET api/Metadata/EventsAll](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-EventsAll) | + +No documentation available. + + | +| [GET api/Metadata/EventsAll?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-EventsAll_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/Aggregates](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Aggregates) | + +No documentation available. + + | +| [GET api/Metadata/Aggregates?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-Aggregates_applicationName) | + +No documentation available. + + | +| [GET api/Metadata/AggregateProperties?assemblyFullName={assemblyFullName}&fullName={fullName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-AggregateProperties_assemblyFullName_fullName) | + +No documentation available. + + | +| [GET api/Metadata/AggregatesAll](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-AggregatesAll) | + +No documentation available. + + | +| [GET api/Metadata/AggregatesAll?applicationName={applicationName}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-Metadata-AggregatesAll_applicationName) | + +No documentation available. + + | + +## QueryCommands + +| API | Description | +| --- | --- | +| [POST api/QueryCommands](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryCommands) | +No documentation available. + + | + +## QueryEvents + +| API | Description | +| --- | --- | +| [POST api/QueryEvents](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryEvents) | +No documentation available. + + | +| [POST api/QueryCommandEvents](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryCommandEvents) | + +No documentation available. + + | +| [POST api/QueryCorrelationEvents](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryCorrelationEvents) | + +No documentation available. + + | + +## QueryExecute + +| API | Description | +| --- | --- | +| [GET api/QueryExecuteStream](https://10.255.255.2/ApplicationService/Help/Api/GET-api-QueryExecuteStream) | +No documentation available. + + | +| [POST api/QueryExecuteStream](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryExecuteStream) | + +No documentation available. + + | +| [POST api/QueryCancel](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryCancel) | + +No documentation available. + + | +| [POST api/QueriesCancel](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueriesCancel) | + +No documentation available. + + | +| [POST api/QueryExecute](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryExecute) | + +No documentation available. + + | + +## QueryScalarExecute + +| API | Description | +| --- | --- | +| [POST api/QueryScalarExecuteAsync](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryScalarExecuteAsync) | +No documentation available. + + | +| [POST api/QueryScalarExecute](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QueryScalarExecute) | + +No documentation available. + + | + +## QuerySnapshots + +| API | Description | +| --- | --- | +| [POST api/QuerySnapshots](https://10.255.255.2/ApplicationService/Help/Api/POST-api-QuerySnapshots) | +No documentation available. + + | + +## Workflow + +| API | Description | +| --- | --- | +| [POST api/Workflow/Logon](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-Logon) | +No documentation available. + + | +| [POST api/Workflow/GetUserScreen](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetUserScreen) | + +No documentation available. + + | +| [POST api/Workflow/GetUserScreenInfo](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetUserScreenInfo) | + +No documentation available. + + | +| [POST api/Workflow/GetUserScreenParameters](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetUserScreenParameters) | + +No documentation available. + + | +| [POST api/Workflow/GetUserProcessAttributes](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetUserProcessAttributes) | + +No documentation available. + + | +| [POST api/Workflow/ExecuteUserAction](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-ExecuteUserAction) | + +No documentation available. + + | +| [POST api/Workflow/ExecuteUserActionGetScreen](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-ExecuteUserActionGetScreen) | + +No documentation available. + + | +| [POST api/Workflow/TerminateUserSession](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-TerminateUserSession) | + +No documentation available. + + | +| [POST api/Workflow/Start](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-Start) | + +No documentation available. + + | +| [POST api/Workflow/GetScreen](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetScreen) | + +No documentation available. + + | +| [POST api/Workflow/GetScreenParameters](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetScreenParameters) | + +No documentation available. + + | +| [POST api/Workflow/GetProcessAttributes](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetProcessAttributes) | + +No documentation available. + + | +| [POST api/Workflow/ExecuteAction](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-ExecuteAction) | + +No documentation available. + + | +| [POST api/Workflow/ExecuteActionGetScreen](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-ExecuteActionGetScreen) | + +No documentation available. + + | +| [POST api/Workflow/Terminate](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-Terminate) | + +No documentation available. + + | +| [POST api/Workflow/GetSessions](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-GetSessions) | + +No documentation available. + + | +| [POST api/Workflow/ExecuteProcessAction](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-ExecuteProcessAction) | + +No documentation available. + + | +| [POST api/Workflow/Cancel](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-Cancel) | + +No documentation available. + + | +| [POST api/Workflow/ExecuteValidateDialogFormat](https://10.255.255.2/ApplicationService/Help/Api/POST-api-Workflow-ExecuteValidateDialogFormat) | + +No documentation available. + + | + +## WorkflowLog + +| API | Description | +| --- | --- | +| [GET api/WorkflowLog/GetInstances?processDefinitionId={processDefinitionId}&skip={skip}&take={take}&startDateFrom={startDateFrom}&startDateTo={startDateTo}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-GetInstances_processDefinitionId_skip_take_startDateFrom_startDateTo) | +No documentation available. + + | +| [GET api/WorkflowLog/GetInstances?processDefinitionId={processDefinitionId}&skip={skip}&take={take}&startDateFrom={startDateFrom}&startDateTo={startDateTo}&filterAttributeName={filterAttributeName}&filterAttributeValue={filterAttributeValue}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-GetInstances_processDefinitionId_skip_take_startDateFrom_startDateTo_filterAttributeName_filterAttributeValue) | + +No documentation available. + + | +| [GET api/WorkflowLog/GetInstance?processId={processId}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-GetInstance_processId) | + +No documentation available. + + | +| [GET api/WorkflowLog/GetLogs?processId={processId}&skip={skip}&take={take}&logDateFrom={logDateFrom}&logDateTo={logDateTo}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-GetLogs_processId_skip_take_logDateFrom_logDateTo) | + +No documentation available. + + | +| [GET api/WorkflowLog/ValidateInstance?applicationName={applicationName}&processDefinitionId={processDefinitionId}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-ValidateInstance_applicationName_processDefinitionId) | + +No documentation available. + + | +| [GET api/WorkflowLog/Validate?applicationName={applicationName}&processDefinitionId={processDefinitionId}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-Validate_applicationName_processDefinitionId) | + +No documentation available. + + | +| [GET api/WorkflowLog/ValidateInstanceByVersionId?applicationName={applicationName}&processVersionId={processVersionId}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-ValidateInstanceByVersionId_applicationName_processVersionId) | + +No documentation available. + + | +| [GET api/WorkflowLog/ValidateByVersionId?applicationName={applicationName}&processVersionId={processVersionId}](https://10.255.255.2/ApplicationService/Help/Api/GET-api-WorkflowLog-ValidateByVersionId_applicationName_processVersionId) | + +No documentation available. + + | \ No newline at end of file diff --git a/docs/api/POST apiQueryExecute.md b/docs/api/POST apiQueryExecute.md new file mode 100644 index 0000000..25a2f40 --- /dev/null +++ b/docs/api/POST apiQueryExecute.md @@ -0,0 +1,227 @@ +## Request Information + +### URI Parameters + +None. + +### Body Parameters + +[QueryExecute](https://10.255.255.2/ApplicationService/Help/ResourceModel?modelName=QueryExecute) + +| Name | Description | Type | Additional information | +| --- | --- | --- | --- | +| Application | +Application name. + + | String | + +None. + + | +| ClientModule | + +Client module that executes the query. + + | String | + +None. + + | +| QueryType | + +Type of the query. + + | [QueryContextType](https://10.255.255.2/ApplicationService/Help/ResourceModel?modelName=QueryContextType) | + +Default: Reading + + | +| Expression | + +Query expression. + + | String | + +None. + + | +| OrderBy | + +Order by to be applied to the expression. + + | String | + +None. + + | +| Select | + +Select to be applied to the expression. + + | String | + +None. + + | +| Skip | + +Skip to be applied to the expression. + + | Int32 | + +None. + + | +| Take | + +Take to be applied to the expression. + + | Int32 | + +None. + + | +| Parameters | + +Dictionary with the parameters and their values for the query. + + | Dictionary of String \[key\] and [QueryParameterValue](https://10.255.255.2/ApplicationService/Help/ResourceModel?modelName=QueryParameterValue) \[value\] | + +None. + + | +| InlineCount | + +Indicate if an inline count must be done to the query. + + | Boolean | + +None. + + | +| CommandTimeout | + +Gets or sets the command/query timeout. + + | Int32? | + +None. + + | +| QueryId | + +Gets or sets the query execution identifier. + + | Guid? | + +None. + + | + +### Request Formats + +**Sample:** + +``` +{ + "Application": "sample string 1", + "ClientModule": "sample string 2", + "QueryType": 0, + "Expression": "sample string 3", + "OrderBy": "sample string 4", + "Select": "sample string 5", + "Skip": 6, + "Take": 7, + "Parameters": { + "sample string 1": { + "TypeName": "sample string 1", + "Value": {} + }, + "sample string 2": { + "TypeName": "sample string 1", + "Value": {} + } + }, + "InlineCount": true, + "CommandTimeout": 1, + "QueryId": "e57b9e2d-1ba9-42c7-a035-fe964ce53fd6" +} + +``` + +**Sample:** + +Sample not available. + +**Sample:** + +``` +Binary JSON content. See http://bsonspec.org for details. + +``` + +## Response Information + +### Resource Description + +[QueryResultData](https://10.255.255.2/ApplicationService/Help/ResourceModel?modelName=QueryResultData) + +| Name | Description | Type | Additional information | +| --- | --- | --- | --- | +| InLineCount | +Gets or sets the in line count. + + | Int32 | + +None. + + | +| Table | + +Gets or sets the table. + + | [QueryTable](https://10.255.255.2/ApplicationService/Help/ResourceModel?modelName=QueryTable) | + +None. + + | + +### Response Formats + +**Sample:** + +``` +{ + "InLineCount": 1, + "Table": { + "TableName": "sample string 1", + "Columns": [ + { + "ColumnName": "sample string 1", + "TypeName": "sample string 2" + }, + { + "ColumnName": "sample string 1", + "TypeName": "sample string 2" + } + ], + "Rows": [ + null, + { + "Values": { + "sample string 1": {}, + "sample string 3": {} + } + } + ] + } +} + +``` + +**Sample:** + +``` +Binary JSON content. See http://bsonspec.org for details. + +``` \ No newline at end of file diff --git a/docs/docs_downloads/communications/EasyWMS_WebApi_en.html.md b/docs/docs_downloads/communications/EasyWMS_WebApi_en.html.md new file mode 100644 index 0000000..11c2b59 --- /dev/null +++ b/docs/docs_downloads/communications/EasyWMS_WebApi_en.html.md @@ -0,0 +1,4128 @@ + EasyWMS\_WebApi\_en + +## Web API communications with ERP + +- [Introduction](communications/EasyWMS_WebApi_en.html.md#introduction) +- [General considerations](communications/EasyWMS_WebApi_en.html.md#general-considerations) + - [Data format](communications/EasyWMS_WebApi_en.html.md#data-format) +- [Import of messages](communications/EasyWMS_WebApi_en.html.md#import-of-messages) + - [Request access token](communications/EasyWMS_WebApi_en.html.md#request-access-token) + - [Request token response](communications/EasyWMS_WebApi_en.html.md#request-token-response) + - [Refresh access token request](communications/EasyWMS_WebApi_en.html.md#refresh-access-token-request) + - [Request command execution](communications/EasyWMS_WebApi_en.html.md#request-command-execution) + - [Example in C# to export messages by the ERP](communications/EasyWMS_WebApi_en.html.md#example-in-c#-to-export-messages-by-the-erp) +- [Export of messages](communications/EasyWMS_WebApi_en.html.md#export-of-messages) + - [Structure of exported messages from our application](communications/EasyWMS_WebApi_en.html.md#structure-of-exported-messages-from-our-application) + - [Example in C# to import messages by the ERP](communications/EasyWMS_WebApi_en.html.md#example-in-c#-to-import-messages-by-the-erp) +- [Standard message types for Web API communications with ERP](communications/EasyWMS_WebApi_en.html.md#standard-message-types-for-web-api-communications-with-erp) + - [List of messages](communications/EasyWMS_WebApi_en.html.md#list-of-messages) + - [Masters](communications/EasyWMS_WebApi_en.html.md#masters) + - [Imported messages](communications/EasyWMS_WebApi_en.html.md#imported-messages) + - [Items - ITM](communications/EasyWMS_WebApi_en.html.md#items---itm) + - [Item classification - ITC](communications/EasyWMS_WebApi_en.html.md#item-classification---itc) + - [Owners - OWN](communications/EasyWMS_WebApi_en.html.md#owners---own) + - [Carriers - CAR](communications/EasyWMS_WebApi_en.html.md#carriers---car) + - [Accounts - ACC](communications/EasyWMS_WebApi_en.html.md#accounts---acc) + - [Suppliers - SUP](communications/EasyWMS_WebApi_en.html.md#suppliers---sup) + - [Kits - KIT](communications/EasyWMS_WebApi_en.html.md#kits---kit) + - [User statuses - LCK](communications/EasyWMS_WebApi_en.html.md#user-statuses---lck) + - [Receiving](communications/EasyWMS_WebApi_en.html.md#receiving) + - [Imported messages](communications/EasyWMS_WebApi_en.html.md#imported-messages) + - [Receipt orders - ROR](communications/EasyWMS_WebApi_en.html.md#receipt-orders---ror) + - [Advanced shipping notice - ASN](communications/EasyWMS_WebApi_en.html.md#advanced-shipping-notice---asn) + - [Registration of pre-notified stock for replenishment - SRN](communications/EasyWMS_WebApi_en.html.md#registration-of-pre-notified-stock-for-replenishment---srn) + - [Exported messages](communications/EasyWMS_WebApi_en.html.md#exported-messages) + - [Receipt order status change - ROC](communications/EasyWMS_WebApi_en.html.md#receipt-order-status-change---roc) + - [Receipt or receipt order finalization - ROF](communications/EasyWMS_WebApi_en.html.md#receipt-or-receipt-order-finalization---rof) + - [Receipt or receipt order finalization - ROF01](communications/EasyWMS_WebApi_en.html.md#receipt-or-receipt-order-finalization---rof01) + - [Receipt or receipt order finalization - ROF02](communications/EasyWMS_WebApi_en.html.md#receipt-or-receipt-order-finalization---rof02) + - [Receipt end - REF](communications/EasyWMS_WebApi_en.html.md#receipt-end---ref) + - [Advanced shipping notice OK - ASO](communications/EasyWMS_WebApi_en.html.md#advanced-shipping-notice-ok---aso) + - [Advanced shipping notice KO - ASK](communications/EasyWMS_WebApi_en.html.md#advanced-shipping-notice-ko---ask) + - [Replenishment of pre-notified loose stock – SRO](communications/EasyWMS_WebApi_en.html.md#replenishment-of-pre-notified-loose-stock-%E2%80%93-sro) + - [Cancellation of pre-notified loose stock for replenishment – SRK](communications/EasyWMS_WebApi_en.html.md#cancellation-of-pre-notified-loose-stock-for-replenishment-%E2%80%93-srk) + - [Shipping](communications/EasyWMS_WebApi_en.html.md#shipping) + - [Imported messages](communications/EasyWMS_WebApi_en.html.md#imported-messages) + - [Shipping orders - SOR](communications/EasyWMS_WebApi_en.html.md#shipping-orders---sor) + - [Routes - RUT](communications/EasyWMS_WebApi_en.html.md#routes---rut) + - [Work Orders - WOR](communications/EasyWMS_WebApi_en.html.md#work-orders---wor) + - [Exported messages](communications/EasyWMS_WebApi_en.html.md#exported-messages) + - [Shipping order status change - SOC](communications/EasyWMS_WebApi_en.html.md#shipping-order-status-change---soc) + - [Shipping order close or finalization - SOF](communications/EasyWMS_WebApi_en.html.md#shipping-order-close-or-finalization---sof) + - [Shipping order close or finalization - SOF01](communications/EasyWMS_WebApi_en.html.md#shipping-order-close-or-finalization---sof01) + - [Shipping order close or finalization - SOF02](communications/EasyWMS_WebApi_en.html.md#shipping-order-close-or-finalization---sof02) + - [Truck loads finalization - LOF](communications/EasyWMS_WebApi_en.html.md#truck-loads-finalization---lof) + - [Work Order Finalization - WOF](communications/EasyWMS_WebApi_en.html.md#work-order-finalization---wof) + - [Request and notifications](communications/EasyWMS_WebApi_en.html.md#request-and-notifications) + - [Imported messages](communications/EasyWMS_WebApi_en.html.md#imported-messages) + - [Stock status change request - STR](communications/EasyWMS_WebApi_en.html.md#stock-status-change-request---str) + - [Stock count request - SCR](communications/EasyWMS_WebApi_en.html.md#stock-count-request---scr) + - [Count order request - COR](communications/EasyWMS_WebApi_en.html.md#count-order-request---cor) + - [Container Move Confirmation - CMC](communications/EasyWMS_WebApi_en.html.md#container-move-confirmation---cmc) + - [Exported messages](communications/EasyWMS_WebApi_en.html.md#exported-messages) + - [Kitting - KST](communications/EasyWMS_WebApi_en.html.md#kitting---kst) + - [Dekitting – UNK](communications/EasyWMS_WebApi_en.html.md#dekitting-%E2%80%93-unk) + - [Stock variation - STV](communications/EasyWMS_WebApi_en.html.md#stock-variation---stv) + - [Stock status change- STC](communications/EasyWMS_WebApi_en.html.md#stock-status-change--stc) + - [Warehouse stock count - WSC](communications/EasyWMS_WebApi_en.html.md#warehouse-stock-count---wsc) + - [Count order finalization - COF](communications/EasyWMS_WebApi_en.html.md#count-order-finalization---cof) + - [Container output to PS - COS](communications/EasyWMS_WebApi_en.html.md#container-output-to-ps---cos) + - [Client container closed in MP - COC](communications/EasyWMS_WebApi_en.html.md#client-container-closed-in-mp---coc) + - [Suggested ABC Classification - SAC](communications/EasyWMS_WebApi_en.html.md#suggested-abc-classification---sac) + - [Errors](communications/EasyWMS_WebApi_en.html.md#errors) + - [Exported messages](communications/EasyWMS_WebApi_en.html.md#exported-messages) + - [Error message - ERR](communications/EasyWMS_WebApi_en.html.md#error-message---err) + +## Introduction + +This document describes the communication interface between EasyWMS and the ERP system. + +Communication between these two systems is bidirectional, so two interfaces are defined, import: from the ERP to EasyWMS and export: from EasyWMS to the ERP. + +## General considerations + +For the exchange of information, communication will be used through REST API services. + +For import communications, EasyWMS exposes a REST API endppint that allows executing the different commands that define the communications interface. + +Output communications are also defined by an interface that indicates the fields that are sent in each message. + +To send the export messages, scripts are provided and can be modified to adapt the message information to your Web API services. + +For import and export messages, EasyWMS has some C# classes (POCOs) created following the communications interface, so that they can be used by clients to serialize and deserialize message information. + +### Data format + +The format of the different fields of both import and export messages will be as follows: + +- **bool**. It can take the values: `false` to represent _false_ and `true` to represent _true_. +- **string(N)**. Represents a text string with maximum length N. +- **Enumeration**. Numeric value restricted to certain values. These values will be defined in the field description. +- **DateTime**. Represents a date and time with format `yyyyy-MM-ddTHH:mm:ss.fffffffffK` compatible with ISO 8601. Being + - **yyyyy-MM-dd**. Date in year-month-day format + - **T**. Separator between date and time + - **HH:mm:ss.fffffffff**. Time in 24h format, where `fffffffff` is the ten-millionths of a second. + - **K**. Represents the offset from the UTC time zone (e.g., `+01:00`, `-07:00`). For UTC the value is `Z`. +- **long**. Integer numerical value between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807 by default. +- **decimal**. Numeric value with decimals between ±1.0 x 10-28 and ±7.9228 x 28 by default, where the separator of the decimal part is `.` +- **Int32**. Integer numeric value between -2,147,483,648 and 2,147,483,647 by default. +- **Group**. Contains multiple fields. +- **List**. Set of repeating fields. + +**Note:** Note that for fields that are non-mandatory, the field may not appear or have a `null` value. + +## Import of messages + +Our architecture has an identity and access management (IAM) used to control the access to our applications. The service responsible to manage the security is **EasySTS (Security Token Service)**. This service used the **OAuth 2.0** protocol, which forces any application to request an access token and include it in the communication. + +On the other hand, to import messages we have an application service which exposes an endpoint called **Command Service** that is responsible for receiving and executing the commands with the information sent. + +The steps to send a command to the **Command Service** endpoint are as follows: - Request access token to **EasySTS**. - Send the request by sending the command data to the **Command Service** endpoint. + +### Request access token + +In order to request the access token it is necessary to add a client in EasySTS. Information on how to do this can be found in the following [link](https://msscc.mecalux.com/documentation/Development/master/ES/map_development_concepts/webapi_services/index.md). + +The token request is an **HTTP POST** request handled by the EasySTS: + +- EasySTS URL: https://{your\_host}/EasySTS/OAuth/Token +- Request parameters using **application/x-www-form-urlencoded** format: + + +| Name | Description | Type | Mandatory | +| --- | --- | --- | --- | +| grant\_type | Grant type. Value must be set to **password**. | String | Yes | +| username | User name. | String | Yes | +| password | User password. | String | Yes | +| tenant\_code | Tenant code. | String | Yes | +| language | Language to use. Access token will include this value as a claim. Application Service will use this language to process request. | String | No | +| computer\_name | Client computer name. Used to identify from which computer user/client has been authorized. | String | No | + +In addition, you must set the client’s id and password in the basic HTTP authorization header encoded as base64 with the format **user:password**. + +For example, for the client **Mecalux** with password **q2w3e4r5t6** it would be: + +``` +Authorization: Basic Q3VzdG9tQ2xpZW50OnEydzNlNHI1dDY= +``` + +Request token example: + +``` +POST /EasySTS/OAuth/Token HTTP/1.1 +Host: {your_host} +Content-Type: application/x-www-form-urlencoded +Authorization: Basic TWVjYWx1eDpxMnczZTRyNXQ2 +``` + +### Request token response + +The EasySTS returns the following responses to a token request: + +- Request accepted (HTTP 200): Properties returned in the JSON response: + + +| Name | Description | Type | +| --- | --- | --- | +| access\_token | The access token generated by the EasySTS. | String | +| token\_type | Token type. Always the **bearer** type. | String | +| expires\_in | The duration of time the access token is granted for in seconds. | Integer | +| refresh\_token | Token that can be used to obtain another access token. | String | +| id\_token | JWT token that can be used to obtain user information. | String | +| Issuer | Identifier of the service that generates the token. | String | +| ClientId | Identifier of the client that made the token request. | String | +| UserName | Code of the user who made the token request. | String | +| TenantId | Tenant identifier. | String | + +Accepted response JSON example: + +``` +{ + "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1bmlxd...", + "token_type": "bearer", + "expires_in": 1199, + "refresh_token": "d46Nqzn7PFiGPH6tGlbq8VEQiL7...", + "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0.eyJ1bmlxd...", + "Issuer": "Mecalux.ITSW.SecurityTokenService", + "ClientId": "Mecalux", + "UserName": "mecalux", + "TenantId": "1fc492a2-316f-471e-bc3d-f9374fc4a301", +} +``` + +- Request denied (HTTP 400 or HTTP 401): Properties returned in the JSON response: + +| Name | Description | Type | +| --- | --- | --- | +| error | Error code. | String | +| error\_description | Error description. | String | + +The error code can be one of these values: - invalid\_request: A request parameter is not informed and the service cannot execute the request. - invalid\_client: The authentication of the client informed in the request is not valid because the client does not exist. In this case, an HTTP 401 response is returned. - unauthorized\_client: The authentication of the client informed in the request is not valid because the password is incorrect. - invalid\_grant: The user is locked or has an expired password. - unsupportedgranttype: The type of access specified in the request is not valid. + +Denied response JSON example: + +``` +/invalid license (expired +or missing web service +module) +{ + "error": "invalid_grant", + "error_description": "InvalidLicense" +} +/invalid tenant +{ + "error": "invalid_request", + "error_description": "Tenant not +found" +} +/invalid client secret +{ + "error": "unauthorized_client", + "error_description": "Client secret is +invalid." +} +/invalid user password +{ + "error": "invalid_grant", + "error_description": "InvalidUserPassword" +} +``` + +### Refresh access token request + +Access tokens have limited lifetimes. If your application needs access beyond the lifetime of a single access token, you can use the refresh token. Refresh token allows your application to obtain new access token without having to specify username/password again. + +Refresh access token request is a **HTTP POST** request to the EasySTS, using OAuth 2.0 refresh token grant, and may include some optional parameter. + +- EasySTS token URL (https required): ‘https://{your\_host}/EasySTS/OAuth/Token’ +- Parameters sent using the **application/x-www-form-urlencoded** format: + + +| Name | Description | Type | Mandatory | +| --- | --- | --- | --- | +| grant\_type | Access type. It should always be set to **password**. | String | Yes | +| refresh\_token | Refresh token valid and not expired. | String | Yes | +| forcerevoke | Indicates whether the refresh token should be revoked. It is revoked if is not informed. | String | Not | + +Request example: + +``` +POST /EasySTS/OAuth/Token HTTP/1.1 +Host: localhost +Content-Type: application/x-www-form-urlencoded +Authorization: Basic TWVjYWx1eDpxMnczZTRyNXQ2 +``` + +### Request command execution + +The application service defines a Web API endpoint that receive requests for executing commands. This Web API endpoint is called **CommandExecute** and receives the following parameters: + +- Command Service URL: https://{your\_host}/ApplicationService/api/CommandExecute +- Request parameters using the **application/json** format: + + +| Name | Description | Type | +| --- | --- | --- | +| Id | Command identificator | Guid | +| Name | Command internal name | String | +| Properties | Command properties and their values | Dictionary of String \[key\] and Object \[value\] | + +Example of a request to send the **OWN01** message: + +``` +POST /ApplicationService/api/CommandExecute HTTP/1.1 +Host: localhost +Content-Type: application/json +Authorization: Bearer eyJ0eXAiOiJKV1Qi... +``` + +The response returned by the endpoint can be one of the following: + +- **Successful response** when return code is HTTP 200, is an object with commands warning messages if any: + + ``` + [ + { + "CommandId": "c9e21124-70e8-4075-8209-ef06aee51ebf", + "WarningMessages": [] + } + ] + ``` + +- **Unsuccessful response** when return code is HTTP 401, when no token or invalid token is sent. + +- **Unsuccessful response** when return code is HTTP 500, is an ‘Exception’ object. C# clients can hanlde it as a ‘System.Exception’. In other cases message can be checked using ‘Message’ property. + + ``` + { + "Message": "Report does not + exist" + } + ``` + + +**Note**: Error messages language will be the token language. Token language can be specified using ‘language’ parameter in token request. + +### Example in C# to export messages by the ERP + +We currently have available to our clients some classes generated in C# that can be used to do message requests to the **CommandExecute** service. + +Each of the import messages defined in the communications interface has its own class that defines the properties necessary to do the request. + +These classes have the same name as the communication interface message which they are related. + +The structure of these classes can be seen in the following example: + +``` +public class +OWN01 +{ + public Guid Id { get; set; } + public string Name = "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.OwnerErpCommand, +Mecalux.ITSW.EasyWMS.Modules.Contracts"; + [JsonIgnore] + public OWN01Data +Data { get; set; } + public +Dictionary Properties + { + get { return Data.ToDictionary(); } + } +} +``` + +The previous example is related with the class of the owner message (OWN01). Its properties are the following: + + +| Name | Description | +| --- | --- | +| Id | Command identificator. Used to identify the command in the warnings of the response | +| Name | Internal name of the command to execute | +| Data | Class that contains the properties of the command defined in the **Name** property. Property marked to be not serialized on request | +| Properties | Dictionary created from **Data** property | + +Following is detailed the use of this class to send the OWN01 message to the **CommandExecute** defined in the application service. + +The first step to send a message is create an instance of the OWN01 class and fill it with its data: + +``` +public OWN01 CreateOWN01Data() +{ + return new OWN01() + { + Id = +Guid.NewGuid(), + Data = new OWN01Data() + { + Code = +"Owner1", + Operation = ErpOperation.Create, + IgnoreNulls = true, + Data = +new OwnerErpData() + { + Address = new ErpAddress() + { + AddressLine = "AddressLine", + State = "State" + }, + Description = "Description", + Contact = new ErpContact() + { + Comment = "Comment" + }, + CustomAttribute = new ErpCustomAttribute() + { + Attribute1 = "Attribute1" + } + } + } + }; +} +``` + +Next the code to request and parse the token to send the message to Application Service: + +``` +public async Task GetToken() +{ + Dictionary dictionary = new Dictionary(); + dictionary.Add("grant_type", +"password"); + dictionary.Add("username", +userName); + dictionary.Add("password", +pass); + dictionary.Add("tenant_code", +tenant); + + try + { + + HttpClient client = new HttpClient(); + var +byteArray = Encoding.UTF8.GetBytes($"{clientId}:{clientPass}"); + client.DefaultRequestHeaders + .Accept + .Add(new MediaTypeWithQualityHeaderValue("application/x-www-form-urlencoded")); + + client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray)); + var +response = await client.PostAsync(new Uri("https://applicationHost/EasySTS/OAuth/Token"), new FormUrlEncodedContent(dictionary)); + return +response; + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + throw +ex; + } +} + +public string GetTokenFromResponse(Task tokenResponse) +{ + string token += string.Empty; + + using (Stream receiveStream = tokenResponse.Result.Content.ReadAsStreamAsync().Result) + { + StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8); + string +response = readStream.ReadToEnd(); + JObject joResponse = JObject.Parse(response); + JToken ojObject = joResponse["access_token"]; + token = +ojObject.Value(); + } + return +token; +} +``` + +Finally, we can do the request to the **CommandExecute** service: + +``` +public static HttpClient GetClient(string accessToken) +{ + HttpClient client = new HttpClient(); + client.DefaultRequestHeaders.Accept.Clear(); + client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); + client.DefaultRequestHeaders.Add("Authorization", "Bearer " + accessToken); + return +client; +} + +public async +Task> ExecuteCommandAsync() +{ + /Request a token and +parse it + Task tokenResponse = GetToken(); + string token += GetTokenFromResponse(tokenResponse); + + /Preparing the client +to send the message + using (HttpClient client = GetClient(token)) + { + try + { + /Fill the +OWN01 message and enqueue it + OWN01 ownCommand = CreateOWN01Data(); + Queue cmd = new +Queue(); + cmd.Enqueue(ownCommand); + /Send the +message + using +(var response = await client.PostAsJsonAsync("https://applicationHost/applicationservice/api/CommandExecute", +cmd)) + { + if +(response.StatusCode == System.Net.HttpStatusCode.InternalServerError) + { + AggregateException +exception = response.Content.ReadAsStringAsync().Exception; + throw exception; + } + + response.EnsureSuccessStatusCode(); + return null; + } + }catch(Exception ex) + { + throw +ex; + } + } +} +``` + +## Export of messages + +The system is prepared to communicate messages to the ERP. + +There is no endpoint for exporting messages. This is done by the **GNA** application that is responsible for processing the transactions generated by EasyWMS and communicating them to the ERP. The ERP must expose and endpoint to which **GNA** will send the exported messages. + +In [Imple mentation documentation](https://msscc.mecalux.com/documentation/Implementation/master/ES/deployment/Gna/gna_config/webapi/index.md) you can get information on how to **deploy GNA** for **Web API**. + +The tasks performed by the GNA are the following: - Search the transactions to process. - Transform the transaction information to comply with the defined interface. - Send the message to the ERP endpoint. + +The GNA performs these actions by executing some scripts where the communications are implemented. + +The structure of the classes that the ERP must use to deserialize the received messages is detailed below. + +### Structure of exported messages from our application + +All messages exported by EasyWMS have the same structure: + +| Name | Description | +| --- | --- | +| MessageType | Message type sent (for example, SOC01) | +| Messages | List of messages sent | + +Below we can see the JSON schema for the message **SOC01**: + +``` +{ + "$schema": "http:/json-schema.org/draft-04/schema#", + "title": "SOC01", + "type": "object", + "additionalProperties": false, + "properties": { + "MessageType": { + "type": [ + "null", + "string" + ] + }, + "Messages": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/ShippingOrderStatusChange" + } + } + }, + "definitions": { + "ShippingOrderStatusChange": { + "type": "object", + "additionalProperties": false, + "required": [ + "Site", + "SorCode", + "Status", + "UpdateDate" + ], + "properties": { + "Site": { + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "SorCode": { + "type": "string", + "maxLength": 50, + "minLength": 1 + }, + "Status": { + "type": "string", + "minLength": 1 + }, + "UpdateDate": { + "type": "string", + "format": "date-time", + "minLength": 1 + } + } + } + } +} +``` + +An example of JSON for the **SOC01** message: + +``` +{ + "MessageType": "SOC01", + "Messages": [ + { + "SorCode": "SORDER01", + "Site": "KITDEMO", + "UpdateDateString": "2021-04-07T09:51:15Z", + "Status": "Waiting", + "UpdateDate": "2021-04-07T09:51:15Z" + }, + { + "SorCode": "SORDER02", + "Site": "KITDEMO", + "UpdateDateString": "2021-04-07T09:51:16Z", + "Status": "Waiting", + "UpdateDate": "2021-04-07T09:51:16Z" + } + ] +} +``` + +### Example in C# to import messages by the ERP + +The ERP client can use the provided classes in the implementation of its Web API services to deserialize the requests from the communications scripts. + +These classes, like input messages, are named as the export message which they are related. + +Next, we can see an example of the class to serialize the `SOC01` message: + +``` +public class SOC01 + { + public string MessageType { get; +set; } + + public +IList Messages { get; set; } + } + + public partial class ShippingOrderStatusChange + { + // + // Warehouse code +of the shipping order + // + // + // Código del +almacén desde el que se envió la orden de salida + // + [Required] + [MaxLength(50)] + public +string Site { get; +set; } + + // + // Shipping order +code + // + // + // Código de la +orden de salida + // + [Required] + [MaxLength(50)] + public +string SorCode { get; +set; } + + // + // Current status +of the shipping order. Possible values: Secured, Waiting, Assigned, Release, Working, Paused, StockFailure, Merged, +Grouped + // + // + // Estado en el +que se encuentra actualmente la orden. Posibles valores: Secured, Waiting, Assigned, Release, Working, Paused, +StockFailure, Merged, Grouped + // + [Required] + public +string Status { get; +set; } + + // + // UTC date and +time of the status change of the shipping order + // + // + // Fecha y hora +en horario UTC en la que se produjo el cambio de estado de la orden de salida + // + public +DateTime UpdateDate { get; set; } + + } +``` + +Next, we can see an example of a service implemented in .Net Core to receive requests with the `SOC01` message: + +``` +[Route("api/[controller]")] +[ApiController] +public class TestController : ControllerBase +{ + private readonly ILogger _logger; + public TestController(ILogger logger) + { + _logger = +logger; + } + [HttpGet] + public bool IsAvailable() + { + return +true; + } + [HttpPost] + public async +Task> SendSOC01(SOC01 soc01) + { + await Task.Run(() => _logger.LogInformation(soc01.ToString())); + return +AcceptedAtAction(nameof(SendSOC01)); + } +} +``` + +## Standard message types for Web API communications with ERP + +### List of messages + +Below is a list of the different types of messages in the communications interface, highlighting whether they will be received in the import (from ERP to our applications), or sent in the export (from our applications to ERP). + + +| MASTERS | IMPORT / EXPORT | +| --- | --- | +| [ITM](communications/EasyWMS_WebApi_en.html.md#items---itm) - Items | Import | +| [ITC](communications/EasyWMS_WebApi_en.html.md#item-classification---itc) - Item classifications | Import | +| [OWN](communications/EasyWMS_WebApi_en.html.md#owners---own) - Owners | Import | +| [CAR](communications/EasyWMS_WebApi_en.html.md#carriers---car) - Carriers | Import | +| [ACC](communications/EasyWMS_WebApi_en.html.md#accounts---acc) - Accounts | Import | +| [SUP](communications/EasyWMS_WebApi_en.html.md#suppliers---sup) - Suppliers | Import | +| [KIT](communications/EasyWMS_WebApi_en.html.md#kits---kit) - Kits | Import | +| [LCK](communications/EasyWMS_WebApi_en.html.md#user_status---lck) - User status | Import | + + +| RECEIVING | IMPORT / EXPORT | +| --- | --- | +| [ROR](communications/EasyWMS_WebApi_en.html.md#receipt-orders---ror) - Receipt orders | Import | +| [ASN](communications/EasyWMS_WebApi_en.html.md#advanced-shipping-notice---asn) - Advanced shipping notice | Import | +| [SRN](communications/EasyWMS_WebApi_en.html.md#registration-of-pre-notified-stock-for-replenishment---srn) - Advanced stock notice for replenishment | Import | +| [ROC](communications/EasyWMS_WebApi_en.html.md#receipt-order-status-change---roc) - Receipt order status change | Export | +| [ROF](communications/EasyWMS_WebApi_en.html.md#receipt-or-receipt-order-finalization---rof) - Receipt or receipt order finalization | Export | +| [REF](communications/EasyWMS_WebApi_en.html.md#receipt-end---ref) - Receipt End | Export | +| [ASO](communications/EasyWMS_WebApi_en.html.md#advanced-shipping-notice-ok---aso) - Advanced shipping notice OK | Export | +| [ASK](communications/EasyWMS_WebApi_en.html.md#advanced-shipping-notice-ko---ask) - Advanced shipping notice KO | Export | +| [SRO](communications/EasyWMS_WebApi_en.html.md#replenishment-of-pre-notified-loose-stock-%E2%80%93-sro) - Replenishment of pre-notified loose stock | Export | +| [SRK](communications/EasyWMS_WebApi_en.html.md#cancellation-of-pre-notified-loose-stock-for-replenishment-%E2%80%93-srk) - Cancellation of pre-notified loose stock for replenishment | Export | + + +| SHIPPING | IMPORT / EXPORT | +| --- | --- | +| [SOR](communications/EasyWMS_WebApi_en.html.md#shipping-orders---sor) - Shipping orders | Import | +| [RUT](communications/EasyWMS_WebApi_en.html.md#routes---rut) - Routes | Import | +| [WOR](communications/EasyWMS_WebApi_en.html.md#work-orders---wor) - Work orders | Import | +| [SOC](communications/EasyWMS_WebApi_en.html.md#shipping-order-status-change---soc) - Shipping order status change | Export | +| [SOF](communications/EasyWMS_WebApi_en.html.md#shipping-order-close-or-finalization---sof) - Shipping order close or finalization | Export | +| [LOF](communications/EasyWMS_WebApi_en.html.md#truck-loads-finalization---lof) - Truck load finalization | Export | +| [WOF](communications/EasyWMS_WebApi_en.html.md#work-order-finalization---wof) - Work Order finalization | Export | + + +| REQUESTS AND NOTIFICATIONS | IMPORT / EXPORT | +| --- | --- | +| [STR](communications/EasyWMS_WebApi_en.html.md#stock-status-change-request---str) - Stock status change request | Import | +| [SCR](communications/EasyWMS_WebApi_en.html.md#stock-count-request---scr) - Stock count request | Import | +| [COR](communications/EasyWMS_WebApi_en.html.md#count-order-request---cor) - Request for counting order | Import | +| [CMC](communications/EasyWMS_WebApi_en.html.md#container-move-confirmation---cmc) - Container Move Confirmation | Import | +| [KST](communications/EasyWMS_WebApi_en.html.md#kitting---kst) - Kit stock assembled | Export | +| [UNK](communications/EasyWMS_WebApi_en.html.md#dekitting-%E2%80%93-unk) - Kit stock disassembled | Export | +| [STV](communications/EasyWMS_WebApi_en.html.md#stock-variation---stv) - Stock variation | Export | +| [STC](communications/EasyWMS_WebApi_en.html.md#stock-status-change--stc) - Stock status change | Export | +| [WSC](communications/EasyWMS_WebApi_en.html.md#warehouse-stock-count---wsc) - Warehouse inventory | Export | +| [COF](communications/EasyWMS_WebApi_en.html.md#count-order-finalization---cof) - Warehouse stock count | Export | +| [COS](communications/EasyWMS_WebApi_en.html.md#container-output-to-ps---cos) - Container output to PS | Export | +| [COC](communications/EasyWMS_WebApi_en.html.md#client-container-closed-in-mp---coc) - Client container closed in MP | Export | +| [SAC](communications/EasyWMS_WebApi_en.html.md#suggested-abc-classification---sac) - Suggested ABC classification | Export | + + +| ERRORS | IMPORT / EXPORT | +| --- | --- | +| [ERR](communications/EasyWMS_WebApi_en.html.md#error-message---err) - Error message | Export | + +### Masters + +#### Imported messages + +Messages that will be received in Import direction (from the ERP to MAP). + +##### Items - ITM + +**Message type**: ITM (Item) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.ProductErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message allows to create, modify, delete and upsert the items that can be stored in the warehouse. + +- An item deletion can only be done if there is no data in the current warehouse data related to that item: + - No stock of that item in the warehouse (including ASN, buffers, etc…) + - The item is not a component of any kit + - There are no inbound or Shipping order delivery notes for that item + - There are no pending counts for that item +- When deleting, not all data is necessary, but only primary key data (marked in red). +- The 0..1 and 1 groups indicated in the structure that refers to other entities of Easy WMS will only allow a creation (no modifications or deletions) or changing the field value to refer to another entity already existing in Easy WMS. For example: + - A new item is received with a new unit of measurement as base unit. Both the item and the unit of measurement are created. + - A modification of the item is received. This modification has the base unit set to null, but the attribute ignoreNull is set to true. The base unit of the item will not be changed, only the other changes in the modification will be applied. + - A modification of the item is received. This modification has the base unit set to another new unit of measurement. The new unit of measurement will be created, and set as the base unit of the item. Then, in Easy WMS there will be two units of measurement, as the first one created is not deleted, the item does just not reference it. + +To delete or modify entities of these 0..1 and 1 groups the Easy WMS PC application must be used. + +- The 0..n groups(AlternativeItems,AliasesandConversions) has a complete attribute, which indicates whether all the existing elements are included into the group (when true), or only the modified ones (when false): + - When the complete attribute has a false (0) value: Only the specific elements of the group will be modified, other possible existing elements maintains its previous value. + - When the complete has true(1) value: The message has to include all group elements, because operations set in the groups elements will be performed and after that any other element will be deleted of Easy WMS. E.g.: + - A new item is sent with one alias on it ->item and alias objects are created into the Easy WMS system + - A modification of the Description data field is sent, and the Aliases group has true ignoreNull attribute -> item description is updated, and alias kept its previous values + - A new ITM message is sent, creating a new Alias with the complete attribute set to true ->the new alias will be created but the old one deleted, so the item will have only one alias in the Easy WMS system. +- An entity can only be deleted when is not referenced by any other entity in Easy WMS, even when it is inside a group like AlternativeItem or Conversions. For example, if a unit of measurement of a Conversion is used in an AlternativeItem, that AlternativeItem must be deleted prior to deleting the Conversion. If an Item message is received without that Conversion, and the AlternativeItem still exist, an error will be thrown. +- Creating an element and using it below in the same message is supported. E.g.: + - Inside an ITM message a new UoM is created, and then used forward to define a new Conversion into the item. +- An Alias can only be assigned to one Item or Conversion. If Easy WMS receives an ITM message where an existing Aliasis assigned to another Item or Conversion, an error will be thrown. +- Every single item has a base Alias that is named the same. It is not allowed to delete this base Alias, it will be automatically deleted when the item is deleted + +**Structure**: + +**ITM** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| IgnoreNulls | No | bool | | +| **Operation** | **Yes** | Enumeration | Operation to be executed. 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| **Code** | **Yes** | string(50) | Item Code | +| NewCode | No | string(50) | New item Code (only in case of modification) | +| OwnerCode | No | string(50) | Code of the item stock owner (required only if need to create or if there are more than one owners and none of them are default owner) | +| Data | No | Group | Data about the product. Contains all necessary data to define a product from the ERP | +| | NewOwnerCode | No | string(50) | New item stock owner code in a modification | +| | OwnerDescription | No | string(65) | Owner description | +| | Description | No | string(1000) | Item description | +| | AlternativeDescription | No | string(1000) | Alternative item extra description | +| | ShortDescription | No | string(65) | Item short description | +| | HandlingDescription | No | string(1000) | Item handling description | +| | PickingMessage | No | string(65) | Picking warning message for this item | +| | ImageName | No | string(50) | Item image file name (extension included) | +| | StockLabeled | No | bool | When true, a barcode is included in the stock label. | +| | **UoMBaseCode** | **Yes** | string(50) | Item base UoM (unit of measure). (If a non-existing value is included, it will be added to the system). | +| | UoMBaseDescription | No | string(65) | Description of the UoM. (Only one new unit of measure will be taken into account when registering a new unit of measure. If the unit of measurement already exists, it is ignored). | +| | UoMCustomAttribute | No | Group | Custom attributes for the product’s base unit of measure. | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | MaterialABCCode | No | string(50) | Code of ABC classification | +| | MaterialABCDescription | No | string(65) | Description of the new ABC classification | +| | ProductTypeCode | No | string(50) | Item type | +| | IsPacking | No | bool | Boolean value to indicate that the product is a packaging (true 1) or not (false 0) | +| | IsBulky | No | bool | Boolean value to indicate that this is a bulky item (true 1) or not (false) | +| | Stack | No | long | Maximum level for the item to be placed in a client container; the lower the number, the lower may be the placement of the item inside the container | +| | ProductTypeDescription | No | string(65) | Item type description | +| | ProductFamilyCode | No | string(50) | Code of the Logistic Profile of the Item | +| | ProductFamilyDescription | No | string(65) | Item Family description | +| | Profiles | No | Group | Item profiles | +| | | LogisticProfileCode | No | string | Code for the product’s logistic profile. If its value does not exist in the system the new logistic profile must be created. | +| | | LogisticProfileDescription | No | string | Description for the product’s logistic profile. It will only be taken into account when creating a new logistic profile. | +| | | ReceptionProfileCode | No | string | Code for the product’s reception profile. If not indicated and there is not a default reception profile an error will be generated. | +| | | ReceptionProfileDescription | No | string | Description for the product’s reception profile. It will only be taken into account when creating a new logistic profile. | +| | | PutAwayProfileCode | No | string | Code for the product’s putaway profile. If its value does not exist in the system the new logistic profile must be created. | +| | | PutAwayProfileDescription | No | string | Description for the product’s putaway profile. It will only be taken into account when creating a new putaway profile. | +| | | ShippingProfileCode | No | string | Code for the product’s shipping profile. If not indicated and there is not a default shipping profile an error will be generated. | +| | | ShippingProfileDescription | No | string | Description for the product’s shipping profile. It will only be taken into account when creating a new shipping profile. | +| | | CuttingProfileCode | No | string | Description for the product’s cutting profile. It will only be taken into account when creating a new cutting profile. | +| | | CuttingProfileDescription | No | string | Description for the product’s cutting profile. It will only be taken into account when creating a new cutting profile. | +| | | CountProfileCode | No | string | Description for the product’s count profile. It will only be taken into account when creating a new count profile. | +| | | CountProfileDescription | No | string | Description for the product’s count profile. It will only be taken into account when creating a new count profile. | +| | HazardCode | No | string(50) | Item Hazard code | +| | HazardDescription | No | string(65) | Hazard description | +| | StockClassificationByZoneCode | No | string(50) | Code of the classification per subwarhouse that will apply to the item | +| | StockClassificationByZoneDescription | No | string(65) | Description of the new subwarhouse classification that has been created | +| | MinCuttingQuantity | No | decimal | Gets or sets the min cutting quantity for products with cuttingProfile. | +| | MaxShippingQuantityPerLine | No | decimal | Gets or sets the max shipping quantity per line for products with cuttingProfile. | +| | MaxPartitionsAllowed | No | long | Gets or sets the max partitions allowed for products. | +| | MinTemperature | No | decimal | Item minimum recommended temperature | +| | MaxTemperature | No | decimal | Item maximum recommended temperature | +| | MinWarningQuantity | No | decimal | Item minimum stock quantity (in base UoM) below which will be notified | +| | MaxWarningQuantity | No | decimal | Item maximum stock quantity (in base UoM) above which will be notified | +| | AllowCrossdocking | No | bool | Boolean value allowing crossdocking (true 1) or not (false 0) | +| | AllowCommingle | No | bool | Boolean value allowing store mixing (true 1) or not (false 0) | +| | AliasList | No | List | List of alias for this product | +| | | Operation | No | Enumeration | Operation to perform with Alias data. +When modifying or deleting(1: Update, 3: UPSERT, 2: Delete) AliCode has to be an existing code in Easy WMS related to the item code. When creating(0: Create, 3: UPSERT) AliCode has to be a new code in Easy WMS. +Any other case notifies an error. | +| | | Code | No | string(50) | Alias code of actual item. For this alias owner will be set equal than item’s, and UoM will be set as null. | +| | | NewCode | No | string(50) | New alias code. Base alias code(equals to item code) is not allowed to be modified. | +| | | CustomAttribute | No | Group | Custom attributes for the alias | +| | | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | TransactionalAliasList | No | bool | Mandatory boolean group attribute. When true, a single error rolls back every element process: when false, element errors are handled separately. | +| | CompleteAliasList | No | bool | Mandatory boolean group attribute. When true, list group contains every single element, and not listed elements will be deleted. When false only modified elements are included into the list group. | +| | ConversionList | No | List | List of conversions corresponding to this product | +| | | Operation | No | Enumeration | Operation to perform with Product Packs data. +Only not referenced productpacks in Easy WMS can be deleted. +Otherwise, an error will be notified. | +| | | UoMCode | No | string(50) | Unit of Measure conversion Code. (If a non-existing value is included, the new UoM will be registered in Easy WMS). | +| | | UoMDesc | No | string(1000) | Unit of Measure conversion description. (It will only be taken into account when a new unit of measure is added. If the unit of measurement already exists, it is ignored). | +| | | CustomAttribute | No | Group | Custom attributes for the product conversion. | +| | | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | | Quantity | No | decimal | Item quantity (in base UoM) corresponding to the new UoM. The quantity must be greater than or equal to 1. It would be 1 when it is similar to the base UoM. | +| | | Stack | No | long | Maximun level to put the pack in a container. | +| | | AliasCode | No | string(50) | Product pack alias code. Owner and UoM are set as in Item. Only one Product pack by alias and UoM is permitted. | +| | | Weight | No | decimal | Expected exact weight for the Product pack. Value must be greather than zero. | +| | | MaxWeight | No | decimal | Maximum weight for the Product pack. Value must be greather than zero. | +| | | MinWeight | No | decimal | Minimum weight for the Product pack. Value must be greather than zero. | +| | | ImageName | No | string(50) | Image file name (extension included) | +| | | PreparationTime | No | long | Expected preparation time | +| | | IsVirtual | No | bool | When true, the Product pack is only permitted to transform quantities in order lines. +When false, the stock can be stored and handled in this product pack. +Default value is false. | +| | | AvoidConsolidation | No | bool | It indicates if the item, in the indicated version, avoid consolidation | +| | | SingleParcel | No | bool | It indicates if the item, in the indicated version, must be only pre-packed | +| | | Dimensions | No | Group | Dimensions information about the product conversion (Height, Width, Length and Volume) | +| | | | Height | No | decimal | Height | +| | | | Length | No | decimal | Length | +| | | | Width | No | decimal | Width | +| | | | Volume | No | decimal | Volume | +| | | ContainerList | No | List | List of container types corresponding to this conversio | +| | | | Operation | No | Enumeration | Operation to perform with product pack containers | +| | | | Type | No | string(50) | Container type used to store the Product packs stock | +| | | | CompleteQuantity | No | decimal | Complete quantity for the container and this Product pack | +| | | | MinCompletePercent | No | long | Complete quantity percent excess for negative picking. Default value: 55. | +| | | | PickingPercent | No | long | Complete quantity stock picking percent excess for negative picking. Default value: 50. | +| | | | CompleteContainerHeight | No | decimal | Height that the complete container reaches. The value must be greater than 0. | +| | | | MinCompletePercentForShipping | No | long | Percentage over the complete container quantity for a container to be shipped instead of picked. Default value: 100. | +| | | | AllowExceedCompleteQuantity | No | bool | If 1(true) indicates that the user is allowed to enter more than the amount that goes in the full container. The default value is 0 (false). | +| | | TransactionalContainerList | No | bool | Mandatory boolean group attribute. When true, a single error rolls back every element process: when false, element errors are handled separately. | +| | | CompleteContainerList | No | bool | Mandatory boolean group attribute. When true, list group contains every single element, and not listed elements will be deleted. When false only modified elements are included into the list group. | +| | | IsPresentation | No | bool | When true, the Product pack is also a Product presentation | +| | | ConversionPresentation | No | Group | Presentation of the conversion, in case IsPresentation is true | +| | | | ExpeditionMinimumQuantity | No | decimal | Minimum quantity for an expedition. It must be greater than 0 | +| | | | SaleMinimumQuantity | No | decimal | Minimum quantity for a sale. It must be greater than 0 | +| | | | Cost | No | decimal | Cost of the presentation. It must be greater than 0 | +| | | | Currency | No | string | Cost currency | +| | | | StartingLockDate | No | DateTime | Start lock date | +| | | | EndingLockDate | No | DateTime | End lock date | +| | | | MinWarningQuantity | No | decimal | Conversion’s minimum quantity to issue a warning message. It must be greater than 0 | +| | | | MaxWarningQuantity | No | decimal | Conversion’s maximun quantity to issue a warning message. It must be greater than 0 | +| | | AllowSplitPresentation | No | bool | When true, Product presentation can be split in smaller ones. | +| | | SplitPack | No | string(50) | Product pack in which can be split the presentation | +| | | Customs | No | Group | Customs related codes | +| | | | HSCode | No | string | | +| | TransactionalConversionList | No | bool | Mandatory boolean group attribute. When true, a single error rolls back every element process: when false, element errors are handled separately. | +| | CompleteConversionList | No | bool | Mandatory boolean group attribute. When true, list group contains every single element, and not listed elements will be deleted. When false only modified elements are included into the list group. | +| | AlternativeProductList | No | List | List of alternative products | +| | | Operation | No | Enumeration | Operation to perform with the specific | +| | | Code | No | string(50) | Substitutive item code | +| | | Sequence | No | long | Priority order to replace main item | +| | | QuantityFrom | No | decimal | Item quantity allowed to be replaced by an substitutive item | +| | | UoMCodeFrom | No | string(50) | Item quantity allowed to be replaced by an substitutive item | +| | | QuantityTo | No | decimal | Substitutive item quantity that is replacing the original | +| | | UoMCodeTo | No | string(50) | AltItemQuantityTo used UoM | +| | | StartDate | No | DateTime | Substitutive items allowed start date | +| | | EndDate | No | DateTime | Substitutive items allowed end date | +| | TransactionalAlternativeProductList | No | bool | Mandatory boolean group attribute. When true, a single error rolls back every element process: when false, element errors are handled separately. | +| | CompleteAlternativeProductList | No | bool | Mandatory boolean group attribute. When true, list group contains every single element, and not listed elements will be deleted. When false only modified elements are included into the list group. | +| | CustomAttribute | No | Group | Custom attributes for the product. | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | UomPickCode | No | string | Code for the unit of measure to use in the picking process | +| | DefaultReplenishCapacity | No | decimal | Gets the default replenish capacity for this product in uom base. | +| | DefaultReplenishLevel | No | decimal | Gets the default replenish level for this product in uom base. | +| | ProductTypeDefaultReplenishCapacity | No | decimal | Gets the default replenish capacity for this product type in uom base. | +| | ProductTypeDefaultReplenishLevel | No | decimal | Gets the default replenish level for this product type in uom base. | + +##### Item classification - ITC + +**Message type**: ITC (Item classification) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.Contracts.Commands.StockClassificationByZone.StockClassificationERPCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message allows creating, modifying, deleting and upserting the possible classifications of the stock stored in each subwarehouses or stores. + +- When deleting, not all data is necessary, but only primary key data (marked in red). +- Operations 2 (_Delete_) and 3 (_Upsert_) are the only ones allowed to perform with the Subwarehouses group. + +**Structure**: + +**ITC** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **ClassificationCode** | **Yes** | string(50) | Code of the classification. | +| NewClassificationCode | No | string(50) | New code of the classification in a modification. | +| Description | No | string(1000) | Description of the classification. | +| **Operation** | **Yes** | Enumeration | The operation flag that indicates the process that the ERP is going to make. 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| IgnoreNulls | No | bool | Flag to ignore null values. If it is set to true, null values are not modified in the upsert and update operations. | +| Data | No | Group | Data about the stock classification. It contains all necessary data to define an stock classification from the ERP. | +| | LineList | No | List | Collection of subwarehouse lines belonging to the classification | +| | | Operation | No | Enumeration | Operation to perform with this group +Possible values: Create, Update, Delete. Create when not included | +| | | **WarehouseCode** | **Yes** | string(50) | The classification warehouse code | +| | | **SubwarehouseCode** | **Yes** | string(50) | Subwarehouse or inner store code +The subwarehouse or inner store code has to be in the selected warehouse, or an error will be notified | +| | | MinQuantity | No | Int32 | Minimum classification quantity +Entire number greater than or equal to 0 | +| | | MaxQuantity | No | Int32 | Maximum classification quantity +Entire number greater than 0. When MinQuantity has a value set, this has to be greater | +| | | Sequence | No | Int32 | Classification sequence order +Entire number greater than 0 | +| | CompleteLineList | No | bool | Indicator of completeness for the line list. In case it is true, the whole list must be treated as the only lines allowed for the stock classification. +If it is false, more lines appart from those in the list can exist for this stock classification. | +| | TransactionalLineList | No | bool | Indicator of transactionality for the line list. If 1 (true), the whole list must be treated as an atomic transaction. If 0 (false), each element must be individually transactioned. | + +##### Owners - OWN + +**Message type**: OWN (Owners) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.OwnerErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message allows creating, modifying, deleting and upserting the possible owners of the stock stored in the warehouse. + +- An owner deletion can only be done if there is no other data related to that owner currently in Easy WMS: + + - No item associated to that owner + - No receipt associated with that owner +- When deleting, not all data is necessary, but only primary key data (marked in red). + +- In this case the groups included in the owners message may be registered, updated or deleted together with the owner, since they will have a univocal relationship + + +**Structure**: + +**OWN** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Code** | **Yes** | string(50) | Owner code. When this is a non existing owner, and operation is a creation(0: Create, 3: UPSERT), the owner is created. When operation is a modification(1: Update, 2: Delete) the owner has to exist in the system or an error will be notified. | +| NewCode | No | string(50) | New owner code. Only used when modifying data (1: Update, 3: UPSERT operations). | +| **Operation** | **Yes** | Enumeration | Operation to do. 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| IgnoreNulls | No | bool | Flag to ignore null values. If it is set to true, null values are not modified in the upsert and update operations. | +| Data | No | Group | Data about the owner. It contains all necessary data to define an owner from the ERP. | +| | Description | No | string(1000) | Owner’s description. | +| | Address | No | Group | Data about the owner’s address. | +| | | ZipCode | No | string(65) | Address ZIP Code. | +| | | AddressLine | No | string(65) | First address line. | +| | | AddressLine2 | No | string(65) | Extra address line. | +| | | City | No | string(65) | Address city. | +| | | State | No | string(65) | Address state. | +| | | Country | No | string(65) | Address country. (Two-letter ISO country code). | +| | | Comment | No | string(1000) | Address comment. | +| | Contact | No | Group | Data about the owner’s contact. | +| | | Comment | No | string(1000) | Contact comment. | +| | | Extension | No | string(65) | Contact phone extension. | +| | | Fax | No | string(65) | Contact fax. | +| | | Name | No | string(65) | Contact name. | +| | | Phone | No | string(65) | Contact phone number. | +| | | CellPhone | No | string(65) | Contact cell phone number. | +| | | Email | No | string(65) | Contact email. | +| | CustomAttribute | No | Group | Data about the custom attributes. | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | IsMixingAllowed | No | bool | Data about the owner’s allow mixing. | +| | TaxIdNumber | No | string | Owner’s taxIdNumber. | + +##### Carriers - CAR + +**Message type**: CAR (Carriers) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.AgencyErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message allows creating, modifying, deleting and upserting the carriers that can be used as an attribute of a receipt or Shipping order delivery note. + +A carrier deletion can only be done if there is no other data related to that carrier currently in Easy WMS: - No route associated to that carrier. - No truck load associated to that carrier. - No Shipping order delivery note associated to that carrier. - No reception or receipt order related to that carrier. + +In a carrier deletion not all the fields are required: only the ones that make the primary key (marked in red in the structure). + +The carrier name field does not belong to the primary key, but it must be unique within Easy WMS. + +**Structure**: + +**CAR** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Code** | **Yes** | string(50) | Agency code, which has to be a unique value into the system. When a non-existing value is included and a creation operation (0: Create, 3: UPSERT) is performed, this will be created. When a non-existing value is included in a modification operation (1: Update, 2: Delete) is performed, an error will be notified. | +| NewCode | No | string(50) | New code of the transport agency. Only use in case of modification(1: Update, 3: UPSERT operations) | +| **Operation** | **Yes** | Enumeration | Operation to perform. 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| IgnoreNulls | No | bool | | +| Data | No | Group | Contains all the necessary data involved in the process of creating an agency froim an ERP | +| | **Name** | **Yes** | string(50) | Carrier name | +| | Description | No | string(1000) | Carrier description | +| | CustomAttribute | No | Group | Custom attribute for the Agency | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | Address | No | Group | Address | +| | | ZipCode | No | string(65) | Address ZIP Code. | +| | | AddressLine | No | string(65) | First address line. | +| | | AddressLine2 | No | string(65) | Extra address line. | +| | | City | No | string(65) | Address city. | +| | | State | No | string(65) | Address state. | +| | | Country | No | string(65) | Address country. (Two-letter ISO country code). | +| | | Comment | No | string(1000) | Address comment. | +| | Contact | No | Group | Contact | +| | | Comment | No | string(1000) | Contact comment. | +| | | Extension | No | string(65) | Contact phone extension. | +| | | Fax | No | string(65) | Contact fax. | +| | | Name | No | string(65) | Contact name. | +| | | Phone | No | string(65) | Contact phone number. | +| | | CellPhone | No | string(65) | Contact cell phone number. | +| | | Email | No | string(65) | Contact email. | + +##### Accounts - ACC + +**Message type**: ACC (Accounts) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.AccountErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message allows creating, modifying, deleting and upserting the customer accounts that can be used as addressees of the shipping orders. + +- A customer account deletion can only be done if there is no other data related to that customer account currently in Easy WMS: + - No shipping orders for that customer accounts. + - No stock reserved for that customer accounts +- When deleting, not all data is necessary, but only primary key data (marked in red). +- The AccountType, Company and PreferredCarrier groups are referenced groups, so only a new group or reference to an existing one will be allowed (no deletion, modification or upsert of its data). For example: + - A message is sent with a new customer account that has a Company -> the customer account and the company to which it belongs are registered. + - Another message is sent for the same customer account but with a different value in the Company group -> the new company is registered and referred to from the customer account, but in the system the existence of the company registered in the first message is maintained. +- The rest of the groups included in the message can be added, updated or deleted together with the customer account. + +**Structure**: + +**ACC** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Code** | **Yes** | string(50) | Account code, which has to be a unique value into the system. When a non-existing value is included and a creation operation (0: Create, 3: UPSERT) is performed, this will be created. When a non-existing value is included in a modification operation (1: Update, 2: Delete) is performed, an error will be notified. | +| NewCode | No | string(50) | New account code. Has to be a unique value into the system. Only used when modifying data (1: Update, 3: UPSERT operations). | +| OwnerCode | No | string(50) | Owner code. When this is a non existing owner, and operation is a creation(0: Create, 3: UPSERT), the owner is created. When operation is a modification(1: Update, 2: Delete) the owner has to exist in the system or an error will be notified. | +| NewOwnerCode | No | string(50) | New owner code. Only used when modifying data (1: Update, 3: UPSERT operations). | +| **Operation** | **Yes** | Enumeration | Operation to perform. 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| IgnoreNulls | No | bool | ACC mandatory boolean attribute. When true (1) null or not existing data fields keep its original value; when false (0) data fields are set to void. | +| Data | No | Group | Data about the account. It contains the necessary data to define the account from the ERP. | +| | **Name** | **Yes** | string(50) | Account name. | +| | Description | No | string(1000) | Account description. | +| | Terms | No | string(1000) | Free text to include a description of the terms negotiated with the client. | +| | AutoMerge | No | bool | True (1) indicates that orders merger will be automatically made when possible. False (0) indicates that no merge will be done automatically. Not implemented. When not introduced, default value is false (0). | +| | AccountTypeCode | No | string(50) | Account type code. When not existing, it will be created into the system. | +| | AccountTypeDescription | No | string(65) | Account type description. Only used when a new type is created. | +| | CompanyData | No | Group | Data about the company. It contains the necessary data to define the company from the ERP. | +| | | **Name** | **Yes** | string(50) | Company name. When not existing, it will be created into the system. | +| | | Description | No | string(65) | Company description. Only used when a new company is created. | +| | | **Code** | **Yes** | string(50) | Company code. When not existing, it will be created into the system. | +| | PreferredCarrierCode | No | string(65) | Preferred carrier code for the account orders transportation. When a non-existing value is used, an error is notified. | +| | Address | No | Group | Data about the account address. It contains the necessary data to define the account address from the ERP. | +| | | ZipCode | No | string(65) | Address ZIP Code. | +| | | AddressLine | No | string(65) | First address line. | +| | | AddressLine2 | No | string(65) | Extra address line. | +| | | City | No | string(65) | Address city. | +| | | State | No | string(65) | Address state. | +| | | Country | No | string(65) | Address country. (Two-letter ISO country code). | +| | | Comment | No | string(1000) | Address comment. | +| | Contact | No | Group | Data about the account contact. It contains the necessary data to define the account contact from the ERP. | +| | | Comment | No | string(1000) | Contact comment. | +| | | Extension | No | string(65) | Contact phone extension. | +| | | Fax | No | string(65) | Contact fax. | +| | | Name | No | string(65) | Contact name. | +| | | Phone | No | string(65) | Contact phone number. | +| | | CellPhone | No | string(65) | Contact cell phone number. | +| | | Email | No | string(65) | Contact email. | +| | CustomAttribute | No | Group | Data about the custom attributes. It contains the necessary data to define the custom attributes of the account from the ERP. | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | IsStrictFEFO | No | bool | Indicates if the account demands strict expiration date control at shipping (Strict FEFO). | + +##### Suppliers - SUP + +**Message type**: SUP (Suppliers) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.SupplierErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message allows to create, modify, delete and upsert the suppliers data. + +- A supplier deletion can only be done if there is no other data related to that supplier currently in Easy WMS: + + - No receipt orders from that supplier + - No return orders for that supplier +- When deleting, not all data is necessary, but only primary key data (marked in red). + +- The groups _PreferredCarrier_ and _SupplierType_ refers to other entities of the system, and only creation (no modifications or deletions) or changing (to refer other supplier) are allowed. E.g.: + + - A SUP creation message is sent including a new supplier and its preferred carrier ->the new supplier and the new carrier are created into the system. + - A different SUP message is sent, modifying the preferred carrier of the supplier previously created ->the new carrier is created into the system, and its noted as preferred carrier to the supplier. +- The rest of the groups included in the message can be added, updated or deleted together with the supplier. + + +**Structure**: + +**SUP** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Code** | **Yes** | string(50) | Supplier code. +When a non-existing value is included and a creation operation (0: Create, 1: Update) is performed, this will be created. | +| NewCode | No | string(50) | | +| OwnerCode | No | string(50) | The owner code. If a non existent value with a 0: Create operation is introduced in the system, 3: UPSERT will be registered, however if it is a 1: Update operation, 2: Delete will notify an error. | +| NewOwnerCode | No | string(50) | The new owner code. +It will only be used in case the user wants to make an update (1: Update, 3: UPSERT operations). | +| **Operation** | **Yes** | Enumeration | Operation to perform. +Possible values: 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| IgnoreNulls | No | bool | SUP mandatory boolean attribute. +When true (1) null or not existing data fields keep its original value; when false (0) data fields are set to void. | +| Data | No | Group | The data about the container. Contains all necessary data to define a container from the ERP. | +| | **Name** | **Yes** | string(50) | Supplier name. | +| | Description | No | string(1000) | Supplier description. | +| | **SupplierTypeCode** | **Yes** | string(50) | Supplier type code. +When a new type is included, it will be created into the system. | +| | SupplierTypeDescription | No | string(65) | Supplier type description. +Only used when a new supplier type is created. | +| | **PreferredCarrierCode** | **Yes** | string(50) | Preferred carrier code for this supplier. +This has to be an existing value or an error will be notified. | +| | DeliveryConditions | No | string(1000) | Delivery conditions free text description. | +| | ShippingAddress | No | Group | Shipping address. | +| | | ZipCode | No | string(65) | Address ZIP Code. | +| | | AddressLine | No | string(65) | First address line. | +| | | AddressLine2 | No | string(65) | Extra address line. | +| | | City | No | string(65) | Address city. | +| | | State | No | string(65) | Address state. | +| | | Country | No | string(65) | Address country. (Two-letter ISO country code). | +| | | Comment | No | string(1000) | Address comment. | +| | ShippingContact | No | Group | | +| | | Comment | No | string(1000) | Contact comment. | +| | | Extension | No | string(65) | Contact phone extension. | +| | | Fax | No | string(65) | Contact fax. | +| | | Name | No | string(65) | Contact name. | +| | | Phone | No | string(65) | Contact phone number. | +| | | CellPhone | No | string(65) | Contact cell phone number. | +| | | Email | No | string(65) | Contact email. | +| | ReturnContact | No | Group | | +| | | Comment | No | string(1000) | Contact comment. | +| | | Extension | No | string(65) | Contact phone extension. | +| | | Fax | No | string(65) | Contact fax. | +| | | Name | No | string(65) | Contact name. | +| | | Phone | No | string(65) | Contact phone number. | +| | | CellPhone | No | string(65) | Contact cell phone number. | +| | | Email | No | string(65) | Contact email. | +| | ReturnAddress | No | Group | | +| | | ZipCode | No | string(65) | Address ZIP Code. | +| | | AddressLine | No | string(65) | First address line. | +| | | AddressLine2 | No | string(65) | Extra address line. | +| | | City | No | string(65) | Address city. | +| | | State | No | string(65) | Address state. | +| | | Country | No | string(65) | Address country. (Two-letter ISO country code). | +| | | Comment | No | string(1000) | Address comment. | +| | CustomAttribute | No | Group | | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | VerifyItems | No | bool | | + +##### Kits - KIT + +**Message type**: KIT (Kits) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.KitErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message allows creating, modifying, deleting and upserting the kit items data. + +- A kit deletion can only be done if there is no other data related to that kit currently in Easy WMS, i.e.: + + - Kit stock stored. + - Kit stock in assembly locations. + - Receipts, receipts orders, shipping orders or work orders for the kit. + - Kit is also another kits part. +- When deleting, not all data is necessary but only primary key data (marked in red) + +- When a new kit is created in Easy WMS, it is also enabled. + +- The 0..n group _Components_ has a _complete_ attribute, which indicates whether all the existing components are included into the group (when true), or only the modified ones (when false): + + - When the _complete_ attribute has a false (0) value: Only the specific components of the group will be modified, other possible existing components maintains its previous value. + + - When the complete has true (1) value: The message has to include all kit components, because operations set in the kit components will be performed and after that any other component will be deleted of the system. E.g.: + + - A new kit item is sent with two components on it -> kit and components are created into the Easy WMS system. + - A modification of the kit is sent with a new _component_ and the complete attribute set to true ->the component will be created but the old one removed from the kits components list, so the kitwill have only one component in the Easy WMS system. +- Default operation in the _Components_ group is SUPSERT + +- If after the creation or modification of a kit, it runs out of components, the kit is set to disabled. + +- _OnDemand_ field indicates if on demand assemble is requiere for that kit (kit must requiere being assembled). This means that, when a shiping order asking for a kit is received, it will be cheked if there are enough kits on the warehouse to supply the order, in other case, shipping orders to supply the order will be created. This testing is made in this situations: enable replenishment, reserve, assign and release. + + +**Structure**: + +**KIT** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **ItemCode** | **Yes** | string(50) | Existing item that is a kit +It has to be an existing item code; otherwise, an error will be notified. | +| **OwnerCode** | **Yes** | string(50) | Existing kit item owner. +When not sent, default owner is taken if exists. +When not sent, if there is only one owner into the system this is taken by default +When not sent and no default owner exists, an error is notified. +It has to be the existing items owner, otherwise an error will be notified | +| **KitVersion** | **Yes** | string(50) | Kit version. Notallowed to be modified +When creating a new kit (0: Create, 3: UPSERT) a new version is required. +When modifying(1: Update, 2: Delete) an existing version reference is required +Error in other cases | +| **Operation** | **Yes** | Enumeration | The operation flag that indicates the process that the ERP is going to make. 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| IgnoreNulls | No | bool | Flag to ignore null values. If it is set to true, null values are not modified in the upsert and update operations. | +| Data | No | Group | Data about the kit. It contains all necessary data to define an kit from the ERP. | +| | **UomBaseCode** | **Yes** | string(50) | Base kit UoM (Unit of Measure) +Has to reference an existing UoM | +| | IsAssembled | No | bool | Indicates that the kit is assembled in the warehouse and therefore if necessary to have stock of it in order to shipping for a OutboundOrder.If the kis is not assembled, its component will be shipped +Default value is true | +| | OnDemand | No | bool | Indicates that, is a SO is received asking for an assemble kit and there isn’t enough stock assembled for it in the warehouse, a work order will be created in order to assemble it +IsAssembled must be true. By default is false | +| | Components | No | List | List of components for this kit | +| | | Operation | No | Enumeration | Operation for the kit component 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| | | **CmpItemCode** | **Yes** | string(50) | Item kit-component code. Creation of a new item is not allowed. +Existing item required. It has to match to the kit owner or an error will be notified. | +| | | CmpVersion | No | string(50) | Kit component version. Only used when the component is also a kit.Not allowed to be modified +When creating, a new version is required. +When modifying, an existing version is required +Otherwise, an error is notified | +| | | **CmpUoMCode** | **Yes** | string(50) | Component UoM (Unit of Measure) +Existing UoM | +| | | **CmpQuantity** | **Yes** | decimal | Quantity specified in the required UoM +Number greater than 0 | +| | | CmpIsMaster | No | bool | When true, this is the master component of the kit. When false, this component is not the master. Only one master by kit is allowed. When many components are marked as master, the last one will be the master set. +Default value is false | +| | | CmpCustomAttribute | No | Group | Custom attributes | +| | | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | CustomAttribute | No | Group | Data about the custom attributes. | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | TransactionalComponentList | No | bool | Indicator of transactionality for the component list. +If it is true, the whole list must be treated as an atomic transaction. +If it is false, each element must be individually transactioned. | +| | CompleteComponentList | No | bool | The 0..n group Components has a complete attribute, which indicates whether all the existing components are included into the group (when true), or only the modified ones(when false): +When the complete attribute has a false value: Only the specific components of the group will be modified, other possible existing components maintains its previous value. +When the complete has true value: The message has to include all kit components, because operations set in the kit components will be performed and after that any other component will be deleted of the system. | +| **KitId** | **Yes** | Guid | The kit identifier | + +##### User statuses - LCK + +**Message type**: LCK (User status) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.StockStatusErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message is used to register, modify or delete the different stock user statuses that exist in the organization. The user statuses allow to apply a status to the stock after the detection of a problem that affects its quality. User statuses can also be assigned when the stock is received. + +The deletion (2(Delete)) can only be carried out if there is no data in the system related to the user status, e.g. if there is any stock line with this stock status. - In the case of deletion, not all fields are required, but only those that make up the primary key (marked in red). - The _CaptureProcesses_ group only supports options 0 (_Create_) and 2 (_Delete_). - If the _CaptureProcesses_ group does not appear, and an operation 0 (_Create_) is being performed, all possible processes will be assigned. - The _complete_ attribute in the group 0..n included in the process capture data, i.e. _CaptureProcesses_, will indicate whether the list of elements is exhaustive or only contains the elements to be modified: - If the _complete_ attribute is false: The system will only perform the specified operation on each element of that group. - If the _complete_ attribute is true: the message must include all the references of elements of the group, so that the operations at group level will also imply the deletion of the possible existing references previously not transmitted in the message. + +- If a modification 1(Update) or 3(Upsert) is sent: + - With _ignoreNull_ true: only the fields that appear in the message for which there are changes are modified. + - With _ignoreNull_ false: a failure occurs if a mandatory field does not appear in the message. Changes are made with the values indicated in the message, and the default value is given to those that do not appear in the message. + +**Estructura**: + +**LCK** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| CaptureProcesses | No | List | | +| | Operation | No | Enumeration | Operation to perform with this group +Possible values: Create, Delete. Create when not included | +| | **ProcessTypeCode** | **Yes** | Enumeration | Represents the process type. The type can be 1(Packaging), 2(Remainder). | +| Data | No | Group | Data about the stock status. It contains the necessary data to define the stock status from the ERP. | +| | Code | No | string | Data about the stock status data. It contains the necessary data to define the stock status from the ERP. | +| | Description | No | string | Data about the stock status data. Gets or sets the lock description from the ERP. | +| | CustomAttribute | No | Group | Data about the stock status data. Custom attributes of the lock. | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | AllowCount | No | bool | Data about the stock status data. Indicates whether the blocking allows counting tasks to be performed on the blocked stock or not. Default, false. | +| | AllowMove | No | bool | Data about the stock status data. Indicates whether the blocking allows movement tasks (in automatic warehouses) to be performed on the blocked stock or not. Default, false. | +| | AllowPick | No | bool | Data about the stock status data. Indicates whether the blocking allows picking tasks to be performed on the blocked stock or not. Default, false. | +| | AllowPutaway | No | bool | Data about the stock status data. Indicates whether the blocking allows putaway tasks to be performed on the blocked stock or not. Default, false. | +| | AllowReceive | No | bool | Data about the stock status data. Indicates whether the blocking allows receiving tasks to be performed on the blocked stock or not. Default, false. | +| | AllowReplenish | No | bool | Data about the stock status data. Indicates whether the lock allows its use to replenish dedicated picking locations or not. Default, false. | +| | AllowShip | No | bool | Data about the stock status data. Indicates whether or not the blocking allows the blocked stock to be shipped. Default, false. | +| | AllowSecure | No | bool | Data about the stock status data. Indicates whether or not the blocking allows stock reservations to be made from the blocked stock. Default, false. | +| | AllowInternalConsumption | No | bool | Data about the stock status data. Indicates whether the blocking allows internal consumption of the blocked stock in production processes or not. Default, false. | +| | CommentRequired | No | bool | Data about the stock status data. Indicates whether it is mandatory to add a comment when adding a user lock of this type. Default, false. | +| | CompleteCaptureProcess | No | bool | Indicator of completeness for the capture process list. If 1 (true), the whole list must be treated as the only lines allowed for the stock status. If 0 (false), more capture processes appart from those in the list can exist for this lock stock. | +| | TransactionalCaptureProcess | No | bool | Indicator of transactionality for the capture process list. If 1 (true), the whole list must be treated as an atomic transaction. If 0 (false), each element must be individually transactioned. | +| IgnoreNulls | No | bool | LCK mandatory boolean attribute. When true (1) null or not existing data fields keep its original value; when false (0) data fields are set to void. | +| NewCode | No | string(50) | New stock status code. Has to be a unique value into the system. Only used when modifying data (1: Update, 3: UPSERT operations). | +| **Operation** | **Yes** | Enumeration | Operation to perform. 0: Create, 1: Update, 2: Delete, 3: UPSERT | + +### Receiving + +#### Imported messages + +Messages that will be received in Import direction (from the ERP to MAP). + +##### Receipt orders - ROR + +**Message type**: ROR (Receipt orders) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.Receptions.Contracts.Commands.InboundOrderErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**:This message allows creating, modifying, deleting and upserting the receipt orders data managed in Easy WMS. - When deleting (2 (Delete)), not all data is necessary but only primary key data (marked in red). - When operatin with lines, the line number is its primary key data. - It is not allowed to change the _Site_ in existing receipt orders. - Delete, update and upsert operations (1 (Update), 2 (Delete), 3 (Upsert)) depend on the current order status and its lines status, both for header and lines. Some modifications can be done: - Line can be edited when: - Line status is not _Cancelled_, _Closed_, _Closing_, _Expired_ or _Completed_. - Line has not any reception line asociated with _Receiving_ or _Closing_ status. + +``` +- The conversion (and item) can be modified as long as nothing has been received on the line (the quantity +received from the line is 0). +- The quantity can be changed as long as the new quantity is greater than or equal to the quantity already received +(never less). Placing a quantity equal to the quantity received will result in the order line being +completed. +``` + +- An incoming order may be cancelled with operation 2 (Delete) as long as no stock has been received for any of its lines and its status is not _Cancelled_, _Closing_, _Closed_, _Receiving_, _Partially received_ or _Completed_. The _CloseReceiptOrderfield_ shall be set to _false_. + +- A receipt order may be closed with operation 2 (Delete), provided that its status is not _Waiting, Cancelled, Closing, Closed, Closed or Receiving_. The _CloseReceiptOrder_ field shall have the value _true_. + +- The operation of creating a new line in an existing order (1 (Create) or 3 (Upsert) for line, 1 (Update) or 3 (Upsert) for order) shall be allowed as long as the order has not been closed, completed, cancelled or expired. + +- The group 0..1 included in the ROR message, i.e. _ReceiptData_, may be added, modified or deleted because of its unique relationship to the incoming order. + +- The _complete_ attribute in the group 0..n _Lines_ included in the ROR message, shall indicate whether the list of lines is exhaustive or only contains the elements to be modified: + + - If the _complete_ attribute is _false_: The system shall only perform the specified operation on each line of that group. + - If the _complete_ attribute is _true_: the message must include all the lines, so that the operations at line level will also imply the deletion of the possible existing lines previously not transmitted in the message. For example: + - A new receipt order with one line is sent -> will be added. + - A modification in the order data is sent, without sending any group _Lines_, and indicating _ignoreNull_ true -> the corresponding data of the order header will be modified and its lines will not be modified, i.e. it will continue to have the line with which it was created. + - A modification in the order data is sent with a Lines group containing two lines -> if necessary, the order header data will be modified, and in addition the two new lines will be created with their data and the one previously existing in the system will be deleted, so that the order will only have the two lines indicated in the last message. +- When the insertion of the order lines is _transactional true_ and an error occurs, none of the lines shall be created, nor shall the empty order be created. + +- A system parameter shall determine whether a ROR message shall also create a receipt associated with the incoming order. With the system parameter true and the _SingleReceipt_ field set to _true_, a single receipt shall be created automatically for the incoming order, the rest of the receipts (if needed) shall be created manually. With the value of the parameter set to _true_ and _SingleReceipt_ set to _false_, receipts will be created automatically whenever any auto-created receipt is closed for the order and not all the quantity indicated in the order lines has been received. + +- Regardless of the value of this parameter, the values of the associated receipts (if any) shall always be maintained in case of deletions and modifications in the order lines as well as in the order header. + +- In the case of not automatically creating the receptions associated to the receipt orders (system parameter _false_), an error could be notified when trying to change data in the order header if the order shares receipt with another one. + +- When a Receipt associated to the order is automatically created, its code shall contain the code of the receipt order. + +- The receipt/s associated to the receipt order will inherit the value of the field that allows to auto create lines and the one that allows to print GS1-128 labels during the receipt, not being able to be edited at receipt level in the case of the auto create lines field and only from ROR message updates. + +- Inbounds reservations are made for each line. An inbound reservation can be made for an existing or non-existing shipping order or for an account, but not both at the same time. + +- Exclusive reservations are made for each line. An exclusive reservation can be made for an existing or non-existing departure order or for an existing or non-existing route/stop, but not both at the same time. + + - For a line, each exclusively reserved quantity will be reflected in the system as a separate stock line once the stock has been received, which will not be merged with the rest of the stock lines with the same characteristics even if it is in the same _holder_ (location, container, or division). +- The same ROR message can request inbound reservations (group _LneStockReserves_) or exclusive reservations (group _LneStockExclusiveReserves_) for the same line, but not both types of reservations at the same time. + + +**Structure**: + +**ROR** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| IgnoreNulls | No | bool | Flag to ignore null values. When true null or not existing data fields keep its original value; when false data fields are set to void. | +| **Operation** | **Yes** | Enumeration | The operation flag that indicates the process that the ERP is going to make. 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| **Code** | **Yes** | string(50) | Receipt order code. +When a non-existing value is included and a creation operation (Create, Upsert) is performed, this will be created. | +| NewCode | No | string(50) | New receipt order code. Only used when a modification is performed (Update, Upsert) | +| **Site** | **Yes** | string(50) | Code of the warehouse site. Has to be an existing site, and It is not allowed to modify it | +| Data | No | Group | Contains all necessary data to define an inbound order from the ERP | +| | **InboundType** | **Yes** | Enumeration | Specific receipt type of this order. Possible values: 1(Return), 0(Supplier), 3(Transfer). | +| | SupplierCode | No | string(50) | Supplier code for the receipt order. It has to reference an existing supplier in the system, or an error will be notified. | +| | AccountCode | No | string(50) | Account code for the return. It has to reference an existing account in the system, or an error will be notified. Only Return value is taken into account. | +| | SaleOrderCode | No | string(50) | Optional shipping order code for the return. Only used when RorType is Return. It has to reference an existing shipping order. | +| | AllowAutoCreateLines | No | bool | Allow to auto create lines to receive non expected stock. This value is inherited by the related reception. false not allow, true allow. | +| | HasContainerLabelPrinting | No | bool | Allow to enable GS1-128 container label printing during receiving process on each reception created from this receipt order. false not allow, true allow. | +| | HasItemLabelPrinting | No | bool | Allow to enable GS1-128 item label printing during receiving process on each reception created from this receipt order. false not allow, true allow. | +| | InboundClassCode | No | string(50) | Receiving class code. Has to be an existing receiving class code and available for ERP receiving, or an error will be notified. | +| | CarrierCode | No | string(50) | Receipt order carrier code. Has to be an existing carrier code, or an error will be notified. | +| | TransportType | No | string(1000) | Open text to describe the type of transportation used. | +| | Document | No | string(65) | Name of the delivery note file for the receipt order. | +| | Source | No | string(65) | Open text to describe the order origin. | +| | Description | No | string(1000) | Receiving order description. | +| | ExpectedNumContainers | No | long | Number of estimated containers. Positive number greater than 0. | +| | ExpectedDate | No | DateTime | Estimated arrival date and time. UTC date-time format. | +| | DockStationCode | No | string(50) | Expected arrival dock. Has to be an existing dock, or an error will be notified. | +| | ValidityDays | No | long | Number of days of the period of validity for the reception. Positive number greater than 0. | +| | IsSingleReceipt | No | bool | Indicates whether, when the system parameter AutoCreateReceptionFromRecOrder, a single receipt shall be created for the order or allows more than one to be created as needed. If not filled in, the default value will be 0 (false). | +| | TransactionalLineList | No | bool | When the insertion of the order lines is transactional (transactional true) and an error occurs, none of the lines will be created, nor will the empty order. | +| | CompleteLineList | No | bool | The complete attribute included in the ROR message will indicate whether the list of lines is exhaustive or only contains the elements to be modified: +If the complete attribute is false: The system will only perform the specified operation on each line of said group. +If the complete attribute is true: the message must include all the lines, so that line-level operations will also imply the deletion of the possible existing +lines previously not transmitted in the message. | +| | LineList | No | List | List of lines for this receipt order. | +| | | Operation | No | Enumeration | Operation for the inbound order lines. Possible values: 0: Create, 1: Update, 2: Delete, 3: UPSERT Default value when not included is 3: UPSERT | +| | | **LineNumber** | **Yes** | long | Line number. +Unique line number into the order. Line number modification is not allowed. LneNumber is the key to perform 1: Update, 2: Delete, 3: UPSERT operations | +| | | **ProductCode** | **Yes** | string(50) | Code for the product to be received in this line. Along with the owner code it univocally identifies a product. +It must match an existing product. | +| | | OwnerCode | No | string(50) | Item owner code. +When not set: +\- If only one owner exists into the system, this value will be set +\- If there is a default owner, this value will be set +\- In any other way, an error is notified | +| | | ContainerCode | No | string(50) | LPN (License Plate Number) that contains the stock.The LPN could be notified in advance or not. | +| | | StockStatusCode | No | string(50) | Status of the stock to be received +Has to be an existing stock status, or an error will be notified | +| | | Package | No | string(65) | Open text to inform the ERP package number | +| | | PurchasePrice | No | Group | Price data | +| | | | **Quantity** | **Yes** | decimal | Informative field with the line total price. Positive number greater than 0. | +| | | | **Currency** | **Yes** | string(65) | Currency related to LneCstPurchase. Only when Quantity is set. | +| | | **UnitOfMeasureCode** | **Yes** | string(50) | UoM (Unit of Measure) of the line quantity. +Has to be an existing UoM into Easy WMS, or an error will be notified. | +| | | **Quantity** | **Yes** | decimal | Expected quantity (in the specified UoM). +Positive number greater than 0 | +| | | FreeQuantity | No | decimal | Free of charge quantity expected (in to the specified UoM) +Positive number | +| | | Terms | No | Group | Defines the terms of the line. | +| | | | ExceedPercentageAllowed | No | decimal | Value 0 resembles that not any upper percentage is accepted +Values greater than 0 resembles the allowed exceed percentage accepted +When this attribute does not exist in the ROR, the item reception profile will set the upper percentage accepted +Integer greater than 0 | +| | | | ReceiveLessAllowed | No | bool | Less quantity is / is not allowed to be received +When false less quantity is not permitted +When true less quantity is permitted | +| | | | HandlingRequired | No | bool | Handling is required or not +true means handling is mandatory. false means handling is not mandatory. | +| | | | HandlingDescription | No | string(65) | Handling required specific description +Only used when LneTrmReqHandling is true | +| | | | DaysOfLife | No | long | Shelf life required in order to allow stock reception +Positive number greater than 0 +When set, the best before date or the expiration date of the logistic attributes of the inbound order line must also be set. | +| | | LogisticAttributes | No | Group | Defines the logistic attributes of the stock of the line | +| | | | LotCode | No | string(65) | Mandatory LOT to be shipped. | +| | | | SerialNumber | No | string(65) | Mandatory serial number to be shipped. | +| | | | ProductionDate | No | DateTime | Earlier production date to be shipped. UTC date-time format | +| | | | ExpirationDate | No | DateTime | Earlier expiration date to be shipped. UTC date-time format. | +| | | | BestBeforeDate | No | DateTime | Earlier best before date to be shipped. UTC date-time format. | +| | | | DaysOfLife | No | long | Lower shelf life to be shipped. Positive number greater than 0. | +| | | | Quality | No | string(65) | Mandatory quality to be shipped. | +| | | | Color | No | string(65) | Mandatory color to be shipped. | +| | | | Source | No | string(65) | Mandatory origin to be shipped. | +| | | | Version | No | string(65) | Mandatory version to be shipped. It is mandatory in case of requesting a non assembled kit item, and must correspond with an enabled version of the kit. | +| | | | ProductionMethod | No | string(65) | Mandatory production method to be shipped. | +| | | | PostProductionTreatment | No | string(65) | Mandatory post-production treatment to be shipped. | +| | | | Size | No | string(65) | Mandatory size to be shipped. | +| | | | Weight | No | decimal | Mandatory weight to be shipped. Decimal number greater than 0. | +| | | CustomAttribute | No | Group | Custom attributes | +| | | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | | StockReserveList | No | List | List of stock reserves for this inbound order line. | +| | | | OutboundOrderCode | No | string(50) | Outbound order related to this reserve of an inbound order line. +It may not exist yet when the reserve is created. If empty, account code must be given. | +| | | | AccountCode | No | string(50) | Account order related to this reserve of an inbound order line. +It must exists in the system on the reserve creation. If empty, outbound order code must be given. | +| | | | QuantityToReserve | No | decimal | Quantity to reserve in the Udm indicated. +It must be greater than 0 and less than or equal to the inbound order line total quantity. | +| | | | ReserveValidDate | No | DateTime | Date and time of reserve expiration on UTC time format. +If empty, reserve does not expire. | +| | | StockExclusiveReserveList | No | List | List of stock reserves for this inbound order line. | +| | | | ExpectedOutboundOrderCode | No | string(50) | Outbound order related to this reserve of an inbound order line. +It may not exist yet when the reserve is created. If empty, route code must be given. | +| | | | ExpectedRouteCode | No | string(50) | Route order related to this reserve of an inbound order line. +It may not exist yet when the reserve is created. If empty, outbound order code must be given. +If it is given, expected route stop number is required. | +| | | | ExpectedRouteStopNumber | No | long | Stop number of the route associated to this inbound order line. +It must be greater than 0 and less than or equal to the total number of the stops of the route. | +| | | | ReserveValidDate | No | DateTime | Date and time of reserve expiration on UTC time format. +If empty, reserve does not expire. | +| | | | QuantityToReserve | No | decimal | Quantity to reserve in the Udm indicated. +It must be greater than 0 and less than or equal to the inbound order line total quantity. | +| | CustomAttribute | No | Group | Custom attributes for this receipt order. | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | OwnerCode | No | string(50) | Order owner code. | +| CloseReceiptOrder | No | bool | Together with the operation Delete, it indicates whether the order must be cancelled (false value) or closed (true value). | + +##### Advanced shipping notice - ASN + +**Message type**: Advanced shipping notice + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.Contracts.Commands.ContainerForASNErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message allows to create, modify, delete or upsert the advanced shipping notice of LPNs (license plate numbers) containing stock to be received.When deleting, not all data is necessary but only primary key data (marked in red). - It is not allowed to change the Site in previously notified LPNs. - Advanced LPNs will be created with the status _Reception pending_ and placed in the ASN location. - Deletion and modification (1 (Update), 2 (Delete), 3 (Upsert)) are only permitted when the LPN status is _Reception pending_. - When the LPN and its stock is receipt into the warehouse, the corresponding stock status change will be notified (STC message). - The 1..n group _Lines_ has a _complete_ attribute, which indicates whether all the existing components are included into the group (when true), or only the modified ones (when false): - When the _complete_ attribute has a _false_ (0) value: Only the specific components of the group will be modified, other possible existing components maintains its previous value. - When the _complete_ has _true_ (1) value: The message has to include all order lines, because operations set in the lines will be performed and after that any other order line will be deleted of the system. E.g.: - A new advanced notification is receipt with two stock _lines_ on it -> the LPN and its lines are created into the Easy WMS system - A modification of the advanced notification is sent with a new line and the complete attribute set to true -> the LPN line will be created but the old two existing _lines_ will be removed from the order list, so the LPN will have only one line to receive in the Easy WMS system. + +- Operations available in the Lines group are only create or delete (0 (Create), 2 (Delete)), and this is a mandatory field. + +- When the Lines _transactional_ attribute is set true and an error happens, not only the lines are not created, but also the empty LPN is not created in Easy WMS. + +- Creating or modifying any Line, corresponding to an item, without all logistic attributes required by this item reception profile, will be responded with an error notifying the lack of data in the ASN message. + +- Stacked containers: + + - Containers group is used to stacked containers. A stacked container can also have as many Containers groups as nested containers as needed to establish the hierarchy. + - To modify the data of a container belonging to a hierarchy of stacked containers (stock included), it’s necessary to send all hierarchy indicating an update operation (1 (Update), 3 (Upsert)) to all containers in the hierarchy. + - Deleting the parent container implies the deleton of all his childs. + - To add a container to a hierarchy of stacked containers, it’s necessary to indicate an update operation (U, S) for the rest of the hierarchy. + - To delete a stacked container, it’s necessary to indicate an update operation (1 (Update), 3 (Upsert)) for the rest of the hierarchy and a delete (2 (Delete)) operation for the container. +- Number of expected containers (NumExpectedContainers): + + - In the case that the number of containers to be received is known in advance but the container codes are not known, such as in the case of containers that come from a production line, a number of expected containers can be indicated, so that as many “equivalent” containers as indicated in this field will be created with the stock lines indicated. The containers will be created with a autogenerate code that will be updated later when identified in the PIE station+. In this case the container code should not be informed. + - Likewise, if the container code or the number of containers to be produced is not informed and it is not the case of an unidentified slave container, the number of containers will be calculated taking into account the quantity of stock indicated in the lines and the complete container quantity configured for the container type. This case will only be taken into account in the case of mono-reference containers. + - In deletion and modification operations (D, U, S) only the equivalent containers that are in ASN at the time of receiving the message will be taken into account and the necessary containers will be created or deleted to reach the indicated number of containers. +- Expedition information (ExpectedOutboundOrderCode y ExpectedRouteCode): + + - In case the expected shipping order or the route of the containr is known, it can be informed in the ASN message. They do not need to exist in Easy WMS when message is received. + - The expected shipping order or the route can be informed. In case the route is informed, it is mandatory to inform the stop number of the route for the container. +- Exclusive reservation: + + - The exclusive reservation of a container reserves its stock for a single shipping order, so that its stock cannot be allocated for the preparation of any other shipping order from the warehouse. + - The container advance notice message allows you to request the exclusive reservation of the container’s stock for a specific shipping order or for any compatible order of a route and stop, which will be searched in the system at the moment when the receipt of the container in the warehouse is validated. + - The exclusive reservation request for a container does not require the completion of data relating to stock lines. + - To request the exclusive reservation of the container it is mandatory to fill in the ContainerCode and NumExpectedContainers fields, in addition: + - To request the reservation for a specific shipping order the ExpectedOutboundOrderCode field must be filled in with the code of an shipping order that may or may not exist, prior to the receipt of the advanced notification. + - To request a reservation for a route, the ExpectedRouteCode and ExpectedRouteStopNumber fields must be filled in. + - To limit the validity of the reservation request in the event that it could not be formalized because there are no shipping orders compatible with the container, a validity date must be indicated in the ExpectedReserveValidDate field. + - In sequenced or density warehouses, the completion of the stock reservation and equivalent container data implies that the channel reservation is made for all identical containers with exclusive reservation for the same shipping order or route and stop. + +**Structure**: + +**ASN** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| IgnoreNulls | No | bool | The flag to ignore null values. If it is set to true, null values are not modified in the upsert and update operations. | +| **Operation** | **Yes** | Enumeration | Operation to perform +Possible values: 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| **Site** | **Yes** | string(50) | Warehouse site code +It should be included in an existing site in the system, and it does not allow being modified. | +| ContainerCode | No | string(50) | Container code. If it includes a non existing value in the system with an operation 0: Create, 3: UPSERT will register it, meanwhile, if the operation is 1: Update, 2: Delete will produce an error. It is not mandatory when it represents an slave container without identification. | +| NumExpectedContainers | No | long | Number of expected containers. | +| ExpectedOutboundOrderCode | No | string | Code of the expected outbound order. | +| ExpectedRouteCode | No | string | Code of the expected outbound route. | +| ExpectedRouteStopNumber | No | long | Number of the route stops expected. | +| NewContainerCode | No | string(50) | New container code. Only used when a modification is performed (1: Update, 3: UPSERT) | +| Data | No | Group | The data about the container. Contains all necessary data to define an container from the ERP. | +| | ContainerTypeCode | No | string(50) | Container type. When unknown container type or not sent, the default container type will be set | +| | Height | No | decimal | Maximum container height in meters +Positive number greater than 0 +If not specified, the height of the container type used will be taken by default. | +| | Weight | No | decimal | Container real weight in kilograms +Positive number greater than 0 | +| | Volume | No | decimal | Container volume in cubic meters +Positive number greater than 0 | +| | DivisionTypeCode | No | string(50) | Division type of the receiving container +Has to be an existing division type, or an error will be notified | +| | TransactionalLineList | No | bool | Indicator of transactionality for the line list. If 1 (true), the whole list must be treated as an atomic transaction. If 0 (false), each element must be individually transactioned. | +| | CompleteLineList | No | bool | The 1..n group Lines has a complete attribute, which indicates whether all the existing components are included into the group(when true), or only the modified ones(when false): +When the complete attribute has a false value: Only the specific components of the group will be modified, other possible existing components maintains its previous value +When the complete has true value: The message has to include all order lines, because operations set in the lines will be performed and after that any other order line will be deleted of the system | +| | LineList | No | List | Container stock list | +| | | **Operation** | **Yes** | Enumeration | Operation to perform with the line stock +Possible values: 0: Create, 2: Delete | +| | | **ProductCode** | **Yes** | string(50) | Stock code to be received +Has to be an existing item code, or an error will be notified | +| | | OwnerCode | No | string(50) | Owner stock code +When no owner is set: +When only one owner exists into the system, this will be set +When some owner is default, this will be set +In other cases, an error will be notified +Has to be the existing stock owner code, or an error will be notified | +| | | DivisionCode | No | string(65) | Field to notify the division for the receiving container. +Has to be and exisiting división code for the division type included, or an error will be notified. +If DivisionType is not included an error will be notified. | +| | | **Quantity** | **Yes** | decimal | Stock quantity in the specified UoM (Unit of Measure) +Positive number greater than 0 | +| | | **UnitOfMeasureCode** | **Yes** | string(50) | Stock UoM used to set the quantity +Existing UoM in EasyWMS, or an error will be notified | +| | | SupplierCode | No | string(50) | Stock supplier code +Existing supplier code in EasyWMS, or an error will be notified | +| | | Weight | No | decimal | Stock weight in kilograms +Positive number greater than 0 | +| | | Package | No | string(65) | Open text to inform the ERP package number | +| | | Status | No | Group | Defines the stock user status. | +| | | | **StockStatus** | **Yes** | string(50) | Stock status that will be set when received +Existing stock status code, or an error will be notified | +| | | | StatusEnd | No | DateTime | End stock status date time +UTC date-time forma | +| | | | Comment | No | string(65) | Stock status comment | +| | | LogisticAttributes | No | Group | Defines the logistic attributes of the stock of the line. | +| | | | LotCode | No | string(65) | Mandatory LOT to be shipped. | +| | | | SerialNumber | No | string(65) | Mandatory serial number to be shipped. | +| | | | ProductionDate | No | DateTime | Earlier production date to be shipped. UTC date-time format | +| | | | ExpirationDate | No | DateTime | Earlier expiration date to be shipped. UTC date-time format. | +| | | | BestBeforeDate | No | DateTime | Earlier best before date to be shipped. UTC date-time format. | +| | | | DaysOfLife | No | long | Lower shelf life to be shipped. Positive number greater than 0. | +| | | | Quality | No | string(65) | Mandatory quality to be shipped. | +| | | | Color | No | string(65) | Mandatory color to be shipped. | +| | | | Source | No | string(65) | Mandatory origin to be shipped. | +| | | | Version | No | string(65) | Mandatory version to be shipped. It is mandatory in case of requesting a non assembled kit item, and must correspond with an enabled version of the kit. | +| | | | ProductionMethod | No | string(65) | Mandatory production method to be shipped. | +| | | | PostProductionTreatment | No | string(65) | Mandatory post-production treatment to be shipped. | +| | | | Size | No | string(65) | Mandatory size to be shipped. | +| | | | Weight | No | decimal | Mandatory weight to be shipped. Decimal number greater than 0. | +| | | CustomAttribute | No | Group | Custom attributes for the product | +| | | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | CustomAttribute | No | Group | Custom attributes for the container | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| IsSlave | No | bool | The value indicating whether container is slave. | +| Containers | No | List | The list of child containers. | +| | **Site** | **Yes** | string(50) | Warehouse site code +It should be included in an existing site in the system, and it does not allow being modified. | +| | **Operation** | **Yes** | Enumeration | Operation to perform +Possible values: 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| | ContainerCode | No | string(50) | Container code. If it includes a non existing value in the system with an operation 0: Create, 3: UPSERT will register it, meanwhile, if the operation is 1: Update, 2: Delete will produce an error. It is not mandatory when it represents an slave container without identification. | +| | NewContainerCode | No | string(50) | New container code. Only used when a modification is performed (1: Update, 3: UPSERT) | +| | IsSlave | No | bool | The value indicating whether container is slave. | +| | IgnoreNulls | No | bool | The flag to ignore null values. If it is set to true, null values are not modified in the upsert and update operations. | +| | Data | No | Group | The data about the container. Contains all necessary data to define an container from the ERP. | +| | | ContainerTypeCode | No | string(50) | Container type. When unknown container type or not sent, the default container type will be set | +| | | Height | No | decimal | Maximum container height in meters +Positive number greater than 0 +If not specified, the height of the container type used will be taken by default. | +| | | Weight | No | decimal | Container real weight in kilograms +Positive number greater than 0 | +| | | Volume | No | decimal | Container volume in cubic meters +Positive number greater than 0 | +| | | DivisionTypeCode | No | string(50) | Division type of the receiving container +Has to be an existing division type, or an error will be notified | +| | | TransactionalLineList | No | bool | Indicator of transactionality for the line list. If 1 (true), the whole list must be treated as an atomic transaction. If 0 (false), each element must be individually transactioned. | +| | | CompleteLineList | No | bool | The 1..n group Lines has a complete attribute, which indicates whether all the existing components are included into the group(when true), or only the modified ones(when false): +When the complete attribute has a false value: Only the specific components of the group will be modified, other possible existing components maintains its previous value +When the complete has true value: The message has to include all order lines, because operations set in the lines will be performed and after that any other order line will be deleted of the system | +| | | LineList | No | List | Container stock list | +| | | | **Operation** | **Yes** | Enumeration | Operation to perform with the line stock +Possible values: 0: Create, 2: Delete | +| | | | **ProductCode** | **Yes** | string(50) | Stock code to be received +Has to be an existing item code, or an error will be notified | +| | | | OwnerCode | No | string(50) | Owner stock code +When no owner is set: +When only one owner exists into the system, this will be set +When some owner is default, this will be set +In other cases, an error will be notified +Has to be the existing stock owner code, or an error will be notified | +| | | | DivisionCode | No | string(65) | Field to notify the division for the receiving container. +Has to be and exisiting división code for the division type included, or an error will be notified. +If DivisionType is not included an error will be notified. | +| | | | **Quantity** | **Yes** | decimal | Stock quantity in the specified UoM (Unit of Measure) +Positive number greater than 0 | +| | | | **UnitOfMeasureCode** | **Yes** | string(50) | Stock UoM used to set the quantity +Existing UoM in EasyWMS, or an error will be notified | +| | | | SupplierCode | No | string(50) | Stock supplier code +Existing supplier code in EasyWMS, or an error will be notified | +| | | | Weight | No | decimal | Stock weight in kilograms +Positive number greater than 0 | +| | | | Package | No | string(65) | Open text to inform the ERP package number | +| | | | Status | No | Group | Defines the stock user status. | +| | | | | **StockStatus** | **Yes** | string(50) | Stock status that will be set when received +Existing stock status code, or an error will be notified | +| | | | | StatusEnd | No | DateTime | End stock status date time +UTC date-time forma | +| | | | | Comment | No | string(65) | Stock status comment | +| | | | LogisticAttributes | No | Group | Defines the logistic attributes of the stock of the line. | +| | | | | LotCode | No | string(65) | Mandatory LOT to be shipped. | +| | | | | SerialNumber | No | string(65) | Mandatory serial number to be shipped. | +| | | | | ProductionDate | No | DateTime | Earlier production date to be shipped. UTC date-time format | +| | | | | ExpirationDate | No | DateTime | Earlier expiration date to be shipped. UTC date-time format. | +| | | | | BestBeforeDate | No | DateTime | Earlier best before date to be shipped. UTC date-time format. | +| | | | | DaysOfLife | No | long | Lower shelf life to be shipped. Positive number greater than 0. | +| | | | | Quality | No | string(65) | Mandatory quality to be shipped. | +| | | | | Color | No | string(65) | Mandatory color to be shipped. | +| | | | | Source | No | string(65) | Mandatory origin to be shipped. | +| | | | | Version | No | string(65) | Mandatory version to be shipped. It is mandatory in case of requesting a non assembled kit item, and must correspond with an enabled version of the kit. | +| | | | | ProductionMethod | No | string(65) | Mandatory production method to be shipped. | +| | | | | PostProductionTreatment | No | string(65) | Mandatory post-production treatment to be shipped. | +| | | | | Size | No | string(65) | Mandatory size to be shipped. | +| | | | | Weight | No | decimal | Mandatory weight to be shipped. Decimal number greater than 0. | +| | | | CustomAttribute | No | Group | Custom attributes for the product | +| | | | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | | CustomAttribute | No | Group | Custom attributes for the container | +| | | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | InboundOrderCode | No | string(50) | Receipt order +Receipt order code. It can be modified with Update operation | +| | NumExpectedContainers | No | long | Number of expected containers | +| | ExpectedOutboundOrderCode | No | string | Code of the expected outbound order. | +| | ExpectedRouteCode | No | string | Code of the expected outbound route. | +| | ExpectedRouteStopNumber | No | long | Number of the route stops expected. | +| | ExpectedReserveValidDate | No | DateTime | Max valid date for the reserve | +| InboundOrderCode | No | string(50) | Receipt order +Receipt order code. It can be modified with Update operation | +| ExpectedReserveValidDate | No | DateTime | Max valid date for the reserve | + +##### Registration of pre-notified stock for replenishment - SRN + +**Message type**: SRN (Stock Replenish Notice) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.Contracts.Commands.StockForASNErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message is used for the creation and deletion of loose stock for automatic warehouse replenishment. - In the case of cancellation (2 (Delete)), not all fields are necessary, but only those that make up the primary key (marked in red). If the stock is created with the non mandatory groups (except the group ReplenishQueue), it will be necessary to indicate the same values that were filled for the creation of the stock. - The modification of the _site_ for the pre-advised stock will not be allowed - Pre-notified loose stock will always be created in _Pending Receipt_ status and at the ASN location. - If the ReplenishQueue group is not filled it is understood that you do not want to generate the replenishment order automatically. - The cancellation operation (2 (Delete)) can only be carried out while the loose stock is in the _Pending state_ - If you delete stock for which a replenishment order exists, the replenishment order must be cancelled automatically. - If loose stock is created for an item that does not contain sufficient logistical attributes to cover the reception profile of that item, the SRN message will be responded to with an error notifying the lack of pre-notification data. + +**Structure**: + +**SRN** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| IgnoreNulls | No | bool | The flag to ignore null values. If it is set to true, null values are not modified in the upsert and update operations. | +| **Operation** | **Yes** | Enumeration | The operation. 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| **WarehouseCode** | **Yes** | string(50) | Warehouse site code. Both the Site and the Code univocally identify the stock. +An existing site must be included in the system and is not allowed to be modified | +| ReplenishQueueData | No | Group | The data about the replenishment. Contains all of the data needed for replenishment from ERP. | +| | **PickingStationCode** | **Yes** | string(50) | Picking conveyor of the replenishment | +| | **Priority** | **Yes** | Enumeration | Priority of the replenihsment order +Possible values: Urgent, High, Normal, Low, VeryLow | +| | **ReplenishmentMode** | **Yes** | Enumeration | Replenihsment mode +Possible values: Automatic, SameProduct, EmptyDivisions, EmptyContainers | +| | **ReplenishmentEfficiencyMode** | **Yes** | Enumeration | Efficiency mode +Possible values: None, Efficiency, Complete | +| ERPPack | No | string(50) | The ERP pack. | +| **Quantity** | **Yes** | decimal | Stock quantity in the UoM +Positive number higher than 0 | +| StockReceptionDate | No | DateTime | | +| UserDefinedStatusComment | No | string(65) | Comment of the stock status for that line | +| UserDefinedStatusEnd | No | DateTime | | +| UserDefinedStatusCode | No | string(50) | Status of the stock once received +Must reference an existing stock user status code in the system, otherwise an error will be reported | +| DivisionCode | No | string(50) | The division code | +| **ProductCode** | **Yes** | string(50) | Item code +YES a value that does not exist in the system is included with a Create operation will be registered, while YES the operation is Delete there will be an error | +| **OwnerCode** | **Yes** | string(50) | Item owner code +YES a value that does not exist in the system is included with a Create operation will be registered, while YES the operation is Delete there will be an error | +| **UnitOfMeasureCode** | **Yes** | string(50) | UoM of the quantity +Must be an existing UoM code in the system, otherwise an error will be notified | +| LogisticAttributes | No | Group | The logistic attributes. | +| | BestBeforeDate | No | DateTime | | +| | Colour | No | string | | +| | DaysOfLife | No | DateTime | | +| | ExpirationDate | No | DateTime | | +| | ProductionMethod | No | string | | +| | ProductionDate | No | DateTime | | +| | PostProductionTreatment | No | string | | +| | Quality | No | string | | +| | SerialNumber | No | string | | +| | Size | No | string | | +| | Source | No | string | | +| | Version | No | string | | +| | LotCode | No | string | | +| CustomAttribute | No | Group | The custom attributes | +| | Attribute1 | No | string | | +| | Attribute2 | No | string | | +| | Attribute3 | No | string | | +| | Attribute4 | No | string | | +| | Attribute5 | No | string | | +| | Attribute6 | No | string | | +| | Attribute7 | No | string | | +| | Attribute8 | No | string | | +| | Attribute9 | No | string | | +| | Attribute10 | No | string | | +| | Attribute11 | No | string | | +| | Attribute12 | No | string | | +| | Attribute13 | No | string | | +| | Attribute14 | No | string | | +| | Attribute15 | No | string | | +| | Attribute16 | No | string | | +| | Attribute17 | No | string | | +| | Attribute18 | No | string | | +| | Attribute19 | No | string | | +| | Attribute20 | No | string | | +| SupplierCode | No | string(50) | Supplier code +Must be an existing supplier code code in the system, otherwise an error will be notified | +| Weight | No | decimal | Stock weight +Positive number higher than 0 | +| SkipMixedValidations | No | bool | The skip mixed validations flag. +If the flag value is true, all mixed validations are skipped. | +| HasTrace | No | bool | The HasTrace flag. +Indicates if the Stock has trace (is Manufactured or Mounted). | + +#### Exported messages + +Messages that will be sent in Export direction (from MAP to the ERP). + +##### Receipt order status change - ROC + +**Message type**: ROC (Receipt orders status change) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: With this message, Easy WMS notifies any status change of an existing receipt order in the system. + +**Structure**: + +**ROC01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the warehouse site | +| **RorCode** | **Yes** | string(50) | Code of the receipt order | +| **Status** | **Yes** | string | Current receipt order status. Possible values: Waiting ReceptionPending Receiving PartiallyReceived Complete Expired Cancelled | +| **UpdateDate** | **Yes** | DateTime | Date and time at which the status change was performed. UTC date time format | + +##### Receipt or receipt order finalization - ROF + +For the receipt or receipt order finalization two version exist: [ROF01](communications/EasyWMS_WebApi_en.html.md#receipt-or-receipt-order-finalization---rof01) y [ROF02](communications/EasyWMS_WebApi_en.html.md#receipt-or-receipt-order-finalization---rof02) + +###### Receipt or receipt order finalization - ROF01 + +**Message type**: ROF (Receipt or receipt order finalization) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: With this message, Easy WMS notifies stock reception or the finalization of an existing receipt order in the system. This message is sent when a stock receipt is finished (closed) or a receipt order is finished (closed, cancelled or expired). + +- When a stock receipt is related to more than one receipt orders, multiple ROF messages are sent, one for each related receipt order. In each message _RecCode_ contains the receipt code, _RorCode_ the receipt order code, and the receipt order lines the received data details including the total received quantity in the order until this moment. + +- When a stock receipt is not related to any receipt order, only one ROF message is sent, containing all the receipt data including its line details. + +- When a receipt order is finished, the message contains the code of the order in \*\*RorCode\* –while RecCode is empty– and its line data details including the order line number _inLneNumber_. + +- The version of the message to be used must be specified in the _EasyWMS.config_ file. + + ``` + + + + ``` + + +**Structure**: + +**ROF01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the warehouse site where the reception is done | +| **RecCode** | **Yes** | string(50) | Receipt code. Mandatory when a receipt is finished | +| **RorCode** | **Yes** | string(50) | Receipt order code. Mandatory when a receipt order is finished | +| **Status** | **Yes** | string | Receipt or receipt order finish status. Values: Partially received Completed Expired Cancelled | +| Document | No | string(65) | Name of the delivery note file for the receipt or receipt order | +| Source | No | string(65) | Open text to describe the receipt origin | +| CarrierCode | No | string(50) | Receipt or receipt order carrier code | +| TransportType | No | string(1000) | Open text to describe the type of transportation | +| **ReceiptData** | **Yes** | Group | Data about the receipt. It contains the necessary data to define the receipt from the ERP | +| | RecDatContainers | No | long | Number of receibed containers for receipt (not send in receipt order). Positive number equal or greater than 0 | +| | RecDatDate | No | DateTime | Reception or expiration/cancellation date and time. UTC date-time format | +| | RecDatDock | No | string(50) | Receipt or receipt order entry dock | +| | RecDatTemperature | No | decimal | Stock temperature when received | +| **Lines** | **Yes** | Group | Data about the lines. It contains the necessary data to define the lines from the ERP | +| | **Line** | **Yes** | List | Data about the line. It contains the necessary data to define the line from the ERP | +| | | **LneNumber** | **Yes** | long | Receipt order stock line number. Receipt stock line number when the receipt has no order related | +| | | **LneItemCode** | **Yes** | string(50) | Received stock item code for this line | +| | | **LneOwnerCode** | **Yes** | string(50) | Received stock owner for this line | +| | | LneContCode | No | string(50) | Stock LPN for this line | +| | | LneStockStatus | No | string(50) | Received stock status for this line | +| | | LnePackage | No | string(65) | Open text to inform the ERP package number | +| | | LnePrice | No | Group | Data about the line price. It contains the necessary data to define the line price from the ERP | +| | | | **LnePriPurchase** | **Yes** | decimal | Informative field with the line total price. Positive number greater than 0 | +| | | | **LnePriCurrency** | **Yes** | string(65) | Currency in which the informaive price is set. Only used when LnePriPurchase has a value | +| | | **LneQuantity** | **Yes** | Group | Data about the line quantity. It contains the necessary data to define the line quantity from the ERP | +| | | | **LneQtyExpected** | **Yes** | decimal | Expected quantity (in the specified UoM). Positive number greater than 0 | +| | | | **LneQtyReceived** | **Yes** | decimal | Total received quantity (in the specified UoM) until this moment. Positive number | +| | | | LneQtyFree | No | decimal | Free of charge quantity expected (in to the specified UoM). Positive number | +| | | | **LneQtyUoMCode** | **Yes** | string(50) | UoM (Unit of Measure) of the line quantity. Has to be an existing UoM into Easy WMS, or an error will be notified | +| | | LneAttributes | No | LneAttributesOut | Data about the line attributes. It contains the necessary data to define the line attributes from the ERP | +| | | LneCustomAttributes | No | LneCustomAttributes | Data about the line custom attributes. It contains the necessary data to define the line custom attributes from the ERP | +| CustomAttributes | No | CustomAttributes | Data about the custom attributes. It contains the necessary data to define the custom attributes from the ERP | + +###### Receipt or receipt order finalization - ROF02 + +**Message type**: ROF (Receipt or receipt order finalization) + +**Import / Export**: Export + +**Version**: 02 + +**Description**: This message is used to notify the ERP of the closing of the receipt order and to inform of the quantities received. All the information of the received stock is also sent. - The version of the message to be used must be specified in the _EasyWMS.config_ file: ` ` + +- This message is sent when a receipt order is finished (closed, cancelled or expired). +- Areceipt order can only be closed if it is in a partially received or completed state. +- When requesting the closing of a receipt order that has some receipts shared with other entry orders, the received stock will be marked with the label _LneStockIsShared_. This is due to the impossibility of determining for which receipt order a specific stock has been received when dealing with receipts from several orders.Las cantidades recibidas serán especificadas en _LneQtyReceived_. El stock recibido se informará en _StockReceivedLines_. + +**Structure**: + +**ROF02** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the warehouse site where the reception is done | +| **RorCode** | **Yes** | string(50) | Receipt order code | +| **Status** | **Yes** | string | Receipt or receipt order finish status. Values: Closed, Cancelled | +| Document | No | string(65) | Name of the delivery note file for the receipt or receipt order | +| Source | No | string(65) | Open text to describe the receipt origin | +| CarrierCode | No | string(50) | Receipt or receipt order carrier code | +| TransportType | No | string(1000) | Open text to describe the type of transportation | +| **Lines** | **Yes** | Group | Lines data | +| | **Line** | **Yes** | List | Line data | +| | | **LneNumber** | **Yes** | long | Receipt order stock line number. Receipt stock line number when the receipt has no order related | +| | | **LneItemCode** | **Yes** | string(50) | Received stock item code for this line | +| | | **LneOwnerCode** | **Yes** | string(50) | Received stock owner for this line | +| | | LneContCode | No | string(50) | Stock LPN for this line | +| | | LneStockStatus | No | string(50) | Received stock status for this line | +| | | LnePackage | No | string(65) | Open text to inform the ERP package number | +| | | LnePrice | No | Group | Line price data | +| | | | **LnePriPurchase** | **Yes** | decimal | Informative field with the line total price | +| | | | **LnePriCurrency** | **Yes** | string(65) | Currency in which the informative price is set | +| | | **LneQuantity** | **Yes** | Group | Line quantity data | +| | | | **LneQtyExpected** | **Yes** | decimal | Expected quantity (in the specified UoM) | +| | | | **LneQtyReceived** | **Yes** | decimal | Total received quantity (in the specified UoM) until this moment | +| | | | LneQtyFree | No | decimal | Free of chargequantity expected (in to the specified UoM) | +| | | | **LneQtyUoMCode** | **Yes** | string(50) | UoM (Unit of Measure) of the line quantity | +| | | LneAttributes | No | LneAttributesOut | Line attributes data | +| | | LneCustomAttributes | No | LneCustomAttributes | Line custom attributes | +| StockReceivedLines | No | Group | Stock received lines data | +| | **LneStockReceived** | **Yes** | List | Line stock received data | +| | | LneStockContainerCode | No | string(50) | Container code where the stock has been received | +| | | LneStockItemCode | No | string(50) | Item code | +| | | LneStockLineNumbers | No | Group | Receipt order line numbers. | +| | | | **LneStockLineNumber** | **Yes** | List | Number of the line the received stock belongs to | +| | | | | **LneStockNumber** | **Yes** | long | Value of the line number the received stock belongs to | +| | | LneStockQty | No | decimal | Quantity received | +| | | **LneStockUoMCode** | **Yes** | string(50) | UoM (Unit of Measure) of the stock received | +| | | LneStockOwnerCode | No | string(50) | Stock received owner | +| | | LneStockStockStatus | No | string(50) | Stock status | +| | | LneStockStockStatusComment | No | string(1000) | Comment | +| | | LneStockStockStatusEndDate | No | DateTime | Stock status end date. UTC date-time format | +| | | LneStockStockStatusRec | No | string(50) | User status | +| | | LneStockStockStatusRecEndDate | No | DateTime | User stock status end date. UTC date-time format | +| | | LneStockRecDate | No | DateTime | Receipt date. UTC date-time format | +| | | LneStockWeight | No | decimal | Line stock weight | +| | | LneStockIsShared | No | bool | By allowing you to merge multiple orders into a single receipt, we can not relate the received stock to an order line with accuracy.So all the stock received from several entry orders in the same receipt, will be marked with true value | +| | | LneStockAttributes | No | LneStockAttributes | Line stock attributes | +| | | LneStockCustomAttributes | No | LneStockCustomAttributes | Line stock custom attributes | +| CustomAttributes | No | CustomAttributes | Custom attributes data | + +##### Receipt end - REF + +**Message type**: REF (Receipt finalization) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message is used to notify the ERP of the receipt of stock. - This message will be sent after the close of a reception. - When we close a receipt that is associated to several receipt orders simultaneously, the received stock will be informed, and the potential receipt orders and potential lines for which the stock could have been received will be notified. - When there is an end of a reception that is not associated with any receipt order, a single REF message will be sent with all the reception data (including its code in _RecCode_) and its lines (with its numbering in _LneNumber_). - The stock received will be informed with the tag _StockReceivedLines_. - It will not be possible to close a reception if nothing has been received. In that case it can only be canceled. Canceling a reception does not generate REF. + +**Structure**: + +**REF01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the warehouse site where the reception is done. Mandatory when a receipt is finished | +| **ReceiptCode** | **Yes** | string(50) | Receipt order code. Mandatory when a receipt order is finished | +| **Status** | **Yes** | string | Receipt or receipt order finish status. Values: Partially received Completed Expired Cancelled | +| Document | No | string(65) | Name of the delivery note file for the receipt or receipt order | +| Source | No | string(65) | Open text to describe the receipt origin | +| CarrierCode | No | string(50) | Receipt or receipt order carrier code | +| TransportType | No | string(1000) | Open text to describe the type of transportation | +| **ReceiptData** | **Yes** | Group | Data about the receipt. It contains the necessary data to define the receipt from the ERP | +| | **RecDatContainers** | **Yes** | long | Number of received containers for receipt (not send in receipt order). Positive number equal or greater than 0 | +| | RecDatDate | No | DateTime | Reception or expiration/cancelation date and time. UTC date-time format | +| | RecDatDock | No | string(50) | Receipt or receipt order entry dock | +| | RecDatTemperature | No | decimal | Stock temperature when received | +| **Lines** | **Yes** | Group | Data about the lines. It contains the necessary data to define the lines from the ERP | +| | **Line** | **Yes** | List | Data about the line. It contains the necessary data to define the line from the ERP | +| | | **LneNumber** | **Yes** | long | Receipt line number | +| | | **LneRecOrdersPotential** | **Yes** | Group | Data about the line reception orders potential. It contains the necessary data to define the line reception orders potential from the ERP | +| | | | **LneRecOrderPotential** | **Yes** | List | Data about the line reception orders potential. It contains the necessary data to define the line reception orders potential from the ERP | +| | | | | LneRecOrderCode | No | string(50) | Receipt order that can be candidate to receive the stock | +| | | | | LneRecOrderNumber | No | long | Receipt order line that can be candidate to receive the stock | +| | | | | LneRecOrderQttyReceived | No | decimal | Received quantity for the input order line from the receiving line | +| | | **LneItemCode** | **Yes** | string(50) | Line item code | +| | | **LneOwnerCode** | **Yes** | string(50) | Line owner code | +| | | LneContCode | No | string(50) | Line container code | +| | | LneStockStatus | No | string(50) | Line stock status | +| | | LnePackage | No | string(65) | Line package | +| | | LnePrice | No | Group | Data about the line price. It contains the necessary data to define the line price from the ERP | +| | | | **LnePriPurchase** | **Yes** | decimal | Informative field with the line total price. Positive number greater than 0 | +| | | | **LnePriCurrency** | **Yes** | string(65) | Currency in which the informative price is set. Only used when LnePriPurchase has a value | +| | | **LneQuantity** | **Yes** | Group | Data about the line quantity. It contains the necessary data to define the line quantity from the ERP | +| | | | **LneQtyExpected** | **Yes** | decimal | Expected quantity (in the specified UoM). Positive number greater than 0 | +| | | | **LneQtyReceived** | **Yes** | decimal | Total received quantity (in the specified UoM) until this moment. Positive number | +| | | | LneQtyFree | No | decimal | Free of chargequantity expected (in to the specified UoM). Positive number | +| | | | **LneQtyUoMCode** | **Yes** | string(50) | UoM (Unit of Measure) of the line quantity.Has to be an existing UoM into Easy WMS, or an error will be notified | +| | | LneAttributes | No | LneAttributesOut | Data about the line attributes. It contains the necessary data to define the line attributes from the ERP | +| | | LneCustomAttributes | No | LneCustomAttributes | Data about the line custom attributes. It contains the necessary data to define the line custom attributes from the ERP | +| | | StockReceivedLines | No | Group | Data about the stock received lines. It contains the necessary data to define the stock received lines from the ERP | +| | | | **LneStockReceived** | **Yes** | List | Data about the line stock received. It contains the necessary data to define the line stock received from the ERP | +| | | | | LneStockContainerCode | No | string(50) | Container code where the stock has been received | +| | | | | LneStockItemCode | No | string(50) | Item code | +| | | | | LneStockQty | No | decimal | Quantity received | +| | | | | LneStockUoMCode | No | string(50) | UoM (Units of Measure) of the stock received | +| | | | | LneStockOwnerCode | No | string(50) | Stock received owner | +| | | | | LneStockStockStatus | No | string(50) | Stock status | +| | | | | LneStockStockStatusComment | No | string(1000) | Comment | +| | | | | LneStockStockStatusEndDate | No | DateTime | Stock status en date. UTC date-time format | +| | | | | LneStockStockStatusRec | No | string(50) | User stock status | +| | | | | LneStockStockStatusRecEndDate | No | DateTime | User stock status end date. UTC date-time format | +| | | | | LneStockRecDate | No | DateTime | Receipt date. UTC date-time format | +| | | | | LneStockWeight | No | decimal | Line stock weight | +| | | | | LneStockAttributes | No | LneStockAttributes | Data about the line stock attributes. It contains the necessary data to define the line stock attributes from the ERP | +| | | | | LneStockCustomAttributes | No | LneStockCustomAttributes | Data about the line stock custom attributes. It contains the necessary data to define the line stock custom attributes from the ERP | +| | | | | LneStockDivisionCode | No | string(50) | Division code | +| RecCustomAttributes | No | CustomAttributes | Data about the reception custom attributes. It contains the necessary data to define the reception custom attributes from the ERP | + +##### Advanced shipping notice OK - ASO + +**Message type**: ASO (Advanced shipping notice OK) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message confirms to the ERP the inbound of an advanced shipping LPN (ASN) into the warehouse site. - All received stock _lines_ has to be included in the ASO message. - When no Lines group included, empty LPN container is confirmed. - Stacked containers: - Containers group is used to notified the received stacked containers. A stacked container can also have as many Containers groups as nested containers as needed to establish the hierarchy. + +**Structure**: + +**ASO01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the warehouse site | +| ContainerCode | No | string(50) | Receipt LPN (License plate number) | +| **ContainerType** | **Yes** | string(50) | Receipt container type | +| **ReceptionDate** | **Yes** | DateTime | Date and time of the reception. UTC date-time format | +| Height | No | decimal | Maximum height, in meters. Positive number greater than 0 | +| Weight | No | decimal | Total weight received in this LPN, in kilos (including containers). Positive number greater than 0 | +| Volume | No | decimal | Volumecubic metersreceipt. Positive number greater than 0 | +| IsSlave | No | bool | If true (value 1) the container is a slave container: It has not stock but fisically exists | +| ReceiptOrderCode | No | string(50) | Receipt order code | +| DivisionType | No | string(50) | Division type of the receiving container | +| Lines | No | Group | Lines data | +| | **Line** | **Yes** | List | Line type | +| | | **LneItemCode** | **Yes** | string(50) | Stock item code | +| | | **LneOwnerCode** | **Yes** | string(50) | Stock owner code | +| | | LneDivision | No | string(50) | Line division code | +| | | **LneQuantity** | **Yes** | decimal | Received quantity (into the specified UoM) | +| | | **LneUoMCode** | **Yes** | string(50) | UoM (Unit of Measure) of the LneQuantity | +| | | LneSupplierCode | No | string(50) | Item supplier code | +| | | LneWeight | No | decimal | Received stock weight in kilos. Positive number greater than 0 | +| | | LnePackage | No | string(65) | Open text to inform the ERP package number | +| | | LneStatus | No | Group | Line status data | +| | | | **LneStaStatus** | **Yes** | string(50) | Status of the stock to be received | +| | | | LneStaEnd | No | DateTime | Stock status end date and time | +| | | | LneStaComment | No | string(1000) | Stock status comment | +| | | LneAttributes | No | StockAttributes | Line attributes data | +| | | LneCustomAttributes | No | LneCustomAttributes | Line custom attributes data | +| CustomAttributes | No | CustomAttributes | Custom attributes | +| Containers | No | Group | Containers data | +| | Container | No | List | Container data | + +##### Advanced shipping notice KO - ASK + +**Message type**: ASK (Advanced shipping notice KO) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message cancels to the ERP the inbound of an advanced shipping LPN (ASN) into the warehouse site (the LPN has not been received). - When the LPN is cancelled, all its lines notified in advanced are cancelled too. - When only some stock lines are receipt into a LPN, no cancellation message is sent but a confirmation message (ASO) instead. + +**Structure**: + +**ASK01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the warehouse site where the LPN was expected | +| **ContainerCode** | **Yes** | string(50) | Advanced receipt LPN (License plate number) | +| **CancelDate** | **Yes** | DateTime | Cancellation date and time. UTC date-time format | +| ReceiptOrderCode | No | string(50) | Receipt order code | + +##### Replenishment of pre-notified loose stock – SRO + +**Message type**: SRO (Stock replenish notice OK) + +**Import / Export**: Export + +**Version**: 01 + +**Nombre del fichero XML**: SRO01yyyyMMddHHmmssxxx.xml + +**Description**: This message is used to confirm that the stock created for the replenishment of the automatic warehouse has been used for replenishment and has been registered as available stock. + +**Structure**: + +**SRO01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Site code where the stock is | +| **ItemCode** | **Yes** | string(50) | Item code | +| **OwnerCode** | **Yes** | string(50) | Owner code | +| **Quantity** | **Yes** | decimal | Stock quantity. Positive number higher or equal to zero | +| **UoMCode** | **Yes** | string(50) | UoM of the quantity | +| **ContainerCode** | **Yes** | string(50) | Destination code container. Code of the container destination of the replenishment | +| DivisionCode | No | string(50) | Destination division of the container. Code of the division destination of the replenishment | +| **LocationCode** | **Yes** | string(50) | Location where the stock has been processed | +| **ReceptionDate** | **Yes** | DateTime | Date and hour of the replenishment. UTC date-time format | +| Status | No | Group | Data about the status. It contains the necessary data to define the status from the ERP | +| | **StaUsrCode** | **Yes** | string(50) | Current user status of the stock | +| | StaUsrEnd | No | DateTime | End date of current user status of the stock. Date and hour in UTC format | +| | StaUsrComment | No | string(1000) | Comment on current user status of the stock | +| Attributes | No | StockAttributes | Data about the stock attributes. It contains the necessary data to define the stock attributes from the ERP | +| CustomAttributes | No | CustomAttributes | Data about the custom attributes. It contains the necessary data to define the custom attributes from the ERP | + +##### Cancellation of pre-notified loose stock for replenishment – SRK + +**Message type**: SRK (Stock Replenish notice KO) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message is used to indicate the cancellation of loose stock created for the replenishment of an automatic warehouse and which has not been used. + +**Structure**: + +**SRK01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the site where the stock is located | +| **CancelDate** | **Yes** | DateTime | Date and time the stock was removed. Date and hour in UTC format | +| **ItemCode** | **Yes** | string(50) | Item code | +| **OwnerCode** | **Yes** | string(50) | Owner code | +| **Quantity** | **Yes** | decimal | Stock quantity. Positive number higher or equal to zero | +| **UoMCode** | **Yes** | string(50) | UoM of the quantity. You must reference an existing conversion in the system. Otherwise the error will be notified | +| Status | No | Group | Data about the status. It contains the necessary data to define the status from the ERP | +| | **StaUsrCode** | **Yes** | string(50) | Current user status of the stock | +| | StaUsrEnd | No | DateTime | End date of current user status of the stock. Date and hour in UTC format | +| | StaUsrComment | No | string(1000) | Comment on current user status of the stock | +| Attributes | No | StockAttributes | Data about the stock attributes. It contains the necessary data to define the stock attributes from the ERP | +| CustomAttributes | No | CustomAttributes | Data about the custom attributes. It contains the necessary data to define the custom attributes from the ERP | + +### Shipping + +#### Imported messages + +Messages that will be received in Import direction (from the ERP to MAP). + +##### Shipping orders - SOR + +**Message type**: SOR (Shipping orders) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.Expeditions.Contracts.Commands.OutboundOrderErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message allows creating, modifying, deleting and upserting the shipping orders data managed in Easy WMS. + +- Shipping orders processed will be created and set to the _Waiting_ status. + +- When deleting, not all data is necessary but only primary key data (marked in red). + +- Line number is the primary key data when operating with order lines. Must be greather than 0. + +- It is not allowed to change the _Site_ in existing shipping orders. + +- It is not allowed to change the header data in merged orders. + +- _Update_, _Delete_ and _Upsert_ operations (1, 2, 3) depends on the current order status and its lines status, i.e.: Delete (2) could imply order cancelation -not deletion- when the status is different of _Creating_ and do not allow deleting the order or its lines. + +- Shipping orders and lines will be created with the data _AutoCreated_ false y _ReceivedFromERP_ true. + +- Only shipping orders created by SOR message could be deleted or modified using SOR messages with operations Update (1), Delete (2) or Upsert (3). + +- When not any dock is set in the message, the default shipping dock for the site is used (when existing). + +- Shipping order lines could always be created (when not _Cancelled_ or _Closed_). + +- All shipping order lines attributes can be modified if no quantity has been prepared or shipped. Shipping order lines quantities (Quantity data group but not UnitOfMeasureCode) can always be modified, being the minimum limit the already shipped quantity. + +- Shipping order lines that are not merged could be deleted when notCancelled or Closed. + +- The 1..n group Lines has a complete attribute, which indicates whether all the existing components are included into the group (when true), or only the modified ones (when false): + + - When the complete attribute has a false (0) value: Only the specific components of the group will be modified, other possible existing components maintains its previous value. + - When the complete has true (1) value: The message has to include all order lines, because operations set in the lines will be performed and after that any other order line will be deleted of the system. E.g.: + - A new shipping order is sent with two order lines on it -> the order and its lines are created into the Easy WMS system + - A modification of the order is sent with a new line and the complete attribute set to true -> the order line will be created but the old two existing lines will be removed from the order list, so the order will have only one line to ship in the Easy WMS system. +- Default operation in the Lines group is 3 (Upsert). + +- Lines could specify requested item, container, or both, in which case it refers to the specific stock from this item stored in the specified container. + +- If lines transactional attribute is set to true (transactional true)and an error happens, the order will not be created. Otherwise (transactional false), the order is created without the lines that fails. + +- For update any attribute on a line, the rest of attributes must be set with the right values. There is not supported to communicate attributes to null to respect the old values (note that _ignoreNull_ attribute on the lines group is not available) + +- _AllowDynamicReplenishment_ field enables automatic replenishment, so, when a shipping order is received with this field active, the automatic job that enables dynamic picking will be active too, creating the requiered tasks to do it. If the field is empty or false automatic replenishment will not be active. + + +**Structure**: + +**SOR** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| IgnoreNulls | No | bool | Flag to ignore null values. If it is set to true, null values are not modified in the upsert and update operations. | +| Operation | No | Enumeration | Operation to do with the shipping order. An error may be reported if the operation is not allowed for the shipping order status. Operation 2 (Delete) will involve a deletion when the order is in creation or a cancellation when it is released. Possibles values: 0 (Create), 1 (Update), 2 (Delete), 3 (Upsert). | +| **Code** | **Yes** | string(50) | Code of the shipping order. If a non-existent value is included in the system with an operation 0 (Create) or 3 (Upsert) will be registered, while if the operation is 1 (Update) or 2 (Delete) an error will occur. | +| NewCode | No | string(50) | New shipping order code. It will only be used in case you want to modify: operations 1 (Update), 3 (Upsert). | +| **Site** | **Yes** | string(50) | System site code. An existing site must be included in the system and its modification is not allowed. | +| Data | No | Group | Data about the shipping order. It contains the necessary data to define a shipping order from the ERP. | +| | Priority | No | Enumeration | Priority of the shipping order. It is ignored when has route. Possible values: 0 (Urgent), 1 (High), 2 (Normal), 3 (Low) and 4 (VeryLow). | +| | OutboundType | No | Enumeration | Priority of the shipping order. Possible values: 0 (Customer), 1 (Return), 2 (Transfer), 3 (Manual), 4 (DirectTransfer), 5 (KitAssembly), 6 (Manufacturing), 7 (KitDisassembly), 8 (Replenishment) y 9 (Desk). | +| | AccountCode | No | string(50) | Account in case the type is Customer. You must reference an existing customer account code in the system, otherwise error will be reported. The value will only be taken into account if the type is Customer. | +| | OutboundClassCode | No | string(50) | The shipping class code. It will only be used for the case that the type is Customer. It must refer to an existing shipping class code that can also be received from ERP or else the error will be notified. | +| | SupplierCode | No | string(50) | Supplier for the case that the type is Return. You must reference an existing supplier code in the system, otherwise error will be reported. The value will only be taken into account if the type is Return. | +| | WarehouseToCode | No | string(50) | Code of the site to which the transfer is made in case the type is Transfer or DirectTransfer. You must reference an existing site in the system, otherwise error will be reported. The value will only be taken into account in case the type is Transfer or DirectTransfer and in this case it will be mandatory. | +| | Document | No | string(65) | Delivery note for the shipping order. | +| | Source | No | string(65) | Free text to describe the shipping order’s origin. | +| | Description | No | string(1000) | Shipping order’s description. | +| | DeliveryInstructions | No | string(1000) | Shipping order’s delivery instructions. | +| | DeskLocationCode | No | string(50) | Code of the location of the counter to which the order is addressed in case of being of type Desk. Code of the location of the counter to which the order is directed. The value will only be taken into account in case the type is Desk and in this case it will be mandatory. | +| | ValidDate | No | DateTime | The date after which the shipping order is not valid. | +| | FollowSequence | No | bool | If it is 1 (true) the sequence indicated by the lines of the shipping order must be followed, 0 (False) otherwise. If it is not filled, the default value 0 (false) will be taken. | +| | Transport | No | Group | Data about the transport of the shipping order. It contains the necessary data to define the transport of shipping order from the ERP. | +| | | AgencyCode | No | string(50) | Transport agency code. There must be the transport agency code in the system, otherwise error will be reported. | +| | | TransportType | No | string(65) | Free text to indicate the type of transport. | +| | | RouteCode | No | string(50) | Code of the route on which the shipping order will be transported. The route code must exist in the system, otherwise error will be reported. | +| | | StopNumber | No | long | Stop number of the route on which the shipping order will be downloaded. Positive integer greater than 0. It will only be taken into account when the RouteCode field is filled, and in that case it will also be mandatory. | +| | Planning | No | Group | Data about the planning of the shipping order. It contains the necessary data to define the planing of shipping order from the ERP. | +| | | AutoReleaseDate | No | DateTime | Date and time of self-release. If it is not refilled it will not self-release. In UTC time. In case of having value, AutoRelease true will be taken in the shipping order. It will not be taken into account if the RouteCode field is filled. | +| | | EstimatedNumCont | No | long | Estimated number of containers that will be part of the shipping order. Positive integer greater than 0. | +| | | ExpectedDockStationCode | No | string(50) | Dock where the loading is expected to be done. Information field. There must be the dock in the system, otherwise error will be reported. It will not be taken into account if the RouteCode field is filled. | +| | | AssignedDockStationCode | No | string(50) | Assigned load dock. There must be the dock in the system, otherwise error will be reported. It will not be taken into account if the RouteCode field is filled. | +| | | PlannedLoadDate | No | DateTime | Estimated load date. In UTC time. | +| | | PlannedShippingDate | No | DateTime | Estimated shipping date. In UTC time. | +| | Preparation | No | Group | Data about the preparation of the shipping order. It contains the necessary data to define the preparation of shipping order from the ERP. | +| | | PackingLocationCode | No | string(50) | Packaging location. It must correspond to an existing packaging location on the system, otherwise error will be reported. | +| | | RequiredClientContainerTypeCode | No | string(50) | Type of client containers expected. It must correspond to an existing container type in the system, otherwise error will be reported. | +| | | ClientContainerTypeCode | No | string(50) | Type of client containers favourite. It must correspond to an existing container type in the system, otherwise error will be reported. | +| | | ClientContainerNumLabels | No | long | Number of labels required for client containers. Positive integer greater than 0. | +| | | ShipReportNumCopies | No | long | Number of copies of the shipping order report. Positive integer greater than 0. | +| | | PackingListNumCopies | No | long | The number of copies of the packaging list. Positive integer greater than 0. | +| | | RequiresPackaging | No | bool | Indicates whether the shipping order should be packaged when it is removed. By default the value 0 (false) will be taken. | +| | TransactionalLineList | No | bool | Indicator of transactionality for the line list. If 1 (true), the whole list must be treated as an atomic transaction. If 0 (false), each element must be individually transactioned. | +| | CompleteLineList | No | bool | Indicator of completeness for the line list. If 1 (true), the whole list must be treated as the only lines allowed for the shipping order. If 0 (false), more lines appart from those in the list can exist for this shipping order. | +| | AllowDynamicReplenishment | No | bool | Indicator to enable automatic replenishment. If it is 1 (true) enable automatic replenishment for items that need it. If it is not filled, the default value 0 (false) will be taken. | +| | LineList | No | List | List of lines for this shipping order. | +| | | Operation | No | Enumeration | Operation to be performed with the data of each line. An error may be reported if the operation is not allowed for the shipping order status. Operation 2 (Delete) will involve a deletion when the shipping order is in creation or a cancellation of the line when the shipping order is released. Possible values: 0 (Create), 1 (Update), 2 (Delete), 3 (Upsert). | +| | | **LineNumber** | **Yes** | long | Line number. It must be unique in shipping order and greater than 0. Otherwise, an error will be reported. It is the line’s unique key identifier for operations 1 (Update), 2 (Delete) and 3 (Upsert). | +| | | MaxLots | No | long | Maximum number of lots that can be shipped if the product has a lot in its logistics profile. Positive number greater than 0. | +| | | ProductCode | No | string(50) | Code of the ordered item. If a container is also indicated, it indicates where the item is wanted. You must reference an existing item code in the system. Otherwise, an error will be reported. It is mandatory if ContainerCode does not exist. | +| | | OwnerCode | No | string(50) | Owner of the ordered item. It is not necessary when what is being ordered is a container. In case of not indicating owner when an item is being ordered, it is considered: a) If there is only one owner for the indicated item, it will be this.b) If there are several owners for the indicated item and one is marked as default, it will be this.c) Otherwise an error will occur. You must reference an existing owner code in the system, otherwise an error will be reported. Owner of the ordered item. This is required only when a value is entered in ProductCode. | +| | | ContainerCode | No | string(50) | Free text that references the code of the ordered container if a specific one is required. If an item is also requested, indicate which container you want that item from. It is mandatory if there is no ProductCode. | +| | | Comment | No | string(1000) | Comment for the shipping order line. | +| | | Quantity | No | Group | Data about the quantity of the line of the shipping order. It contains the data needed to define the quantity of a line of the shipping order from the ERP. | +| | | | QuantityOrdered | No | decimal | Quantity to ship, in the specified UoM. Positive number greater than 0 | +| | | | UnitOfMeasureCode | No | string(50) | Unit of Measure of the line quantity. Has to be an existing UoM into Easy WMS, or an error will be notified. | +| | | | RequiredUnitOfMeasure | No | bool | When 1 (true), the stock has to be shipped in the specified UoM When 0 (false), the stock quantity could be shipped in a different UoM Default value is 0 (false) | +| | | | QuantityToReserve | No | decimal | Quantity to be reserved before shipping in the specified UoM. Positive number greater than 0. | +| | | | QuantityRejected | No | decimal | ejected to be shipped quantity in the specified UoM. Positive number greater than 0. | +| | | | AllowAssignStockExcess | No | bool | When 1 (true) it is allowed to ship over quantity, when 0 (false) it is not.Default value is 0 (false). | +| | | Terms | No | Group | Data about the terms of the shipping order line. It contains the data necessary to define the terms of a line of the shipping order from the ERP. | +| | | | FavouriteContainerTypeCode | No | string(50) | Preferred container type when shipping containers.Only used when no value set in ContainerCode. Has to be an existing container type into EasyWMS, or an error will be notified. | +| | | | FavouriteUnitOfMeasureCode | No | string(50) | Preferred UoM (Unit of Measure) to ship the stock.It must be equal to that specified in UnitOfMeasureCode or to break it. Has to be an existing UoM into Easy WMS, or an error will be notified. | +| | | | CatchWeight | No | bool | Indicates that the weight of the stock must be recorded in shipment 1 (true), 0 (false) otherwise. | +| | | | RequiredToShip | No | bool | When 1 (true), this line is mandatory to ship the whole order. When not introduced, default value is 0 (false). | +| | | | IsCritical | No | bool | When 1 (true), the line must be served complete. If it cannot be served complete, none of the line is served. When not introduced, default value is 0 (false). | +| | | | UseAlternativeProducts | No | bool | | +| | | | Status | No | Group | Data about the stock status required by the line of the shipping order. It contains the necessary data to define the required stock status of a line of the output order from the ERP. | +| | | | | FavouriteStockStatusCode | No | string(50) | Preferred stock status for this line. Has to be an existing status code into EasyWMS, or an error will be notified. Only used when LneTrmStaReq is not set. | +| | | | | RequireStockStatusCode | No | string(50) | Mandatory stock status for this line. Has to be an existing status code into EasyWMS, or an error will be notified. | +| | | | | RejectStockStatusCode | No | string(50) | Not allowed stock status for this line. Has to be an existing status code into EasyWMS, or an error will be notified. | +| | | | ContainerTypeCode | No | string | Type of container required to ship. It must reference an existing container type on the system, otherwise the error will be reported. | +| | | Customer | No | Group | Data about the line of the shipping order of the customer ERP. It contains the necessary data to indicate the customer ERP information of the shipping order line. | +| | | | ProductCode | No | string(65) | Open text to specify the stock customer code. | +| | | | LineNo | No | long | Open text to specify the customer stock line number. | +| | | AltProduct | No | Group | Data about the alternative product the line of the shipping order. It contains the necessary data to define the alternative product of a line of the shipping order from the ERP. | +| | | | ProductCode | No | string(50) | Alternative item code. Has to be an existing item code, owned by the same owner into Easy WMS, or an error will be notified. | +| | | | FromFactor | No | decimal | Units of the original item that are replaced with the quantity specified in ToFactor specified in the item base UoM. Positive number greater than 0. | +| | | | ToFactor | No | decimal | Units of the substitutive item that replace the quantity specified in FromFactor. Positive number greater than 0. | +| | | | UnitOfMeasureCodeTo | No | string(50) | UoM used to describe the quantity specified in ToFactor. Has to be an existing UoM into Easy WMS, or an error will be notified. | +| | | PurchasePrice | No | Group | Data about the price of the product line of the shipping order. It contains the necessary data to define the price of the product of a line of the shipping order from the ERP. | +| | | | **Quantity** | **Yes** | decimal | Informative field with the line total price. Positive number greater than 0. | +| | | | **Currency** | **Yes** | string(65) | Currency related to LneCstPurchase. Only when Quantity is set. | +| | | LogisticAttributes | No | Group | Data about the line logistic attributes of the shipping order. It contains the necessary data to define the logistic attributes of a line of the shipping order from the ERP. | +| | | | LotCode | No | string(65) | Mandatory LOT to be shipped. | +| | | | SerialNumber | No | string(65) | Mandatory serial number to be shipped. | +| | | | ProductionDate | No | DateTime | Earlier production date to be shipped. UTC date-time format | +| | | | ExpirationDate | No | DateTime | Earlier expiration date to be shipped. UTC date-time format. | +| | | | BestBeforeDate | No | DateTime | Earlier best before date to be shipped. UTC date-time format. | +| | | | DaysOfLife | No | long | Lower shelf life to be shipped. Positive number greater than 0. | +| | | | Quality | No | string(65) | Mandatory quality to be shipped. | +| | | | Color | No | string(65) | Mandatory color to be shipped. | +| | | | Source | No | string(65) | Mandatory origin to be shipped. | +| | | | Version | No | string(65) | Mandatory version to be shipped. It is mandatory in case of requesting a non assembled kit item, and must correspond with an enabled version of the kit. | +| | | | ProductionMethod | No | string(65) | Mandatory production method to be shipped. | +| | | | PostProductionTreatment | No | string(65) | Mandatory post-production treatment to be shipped. | +| | | | Size | No | string(65) | Mandatory size to be shipped. | +| | | | Weight | No | decimal | Mandatory weight to be shipped. Decimal number greater than 0. | +| | | CustomAttribute | No | Group | Data about the custom line attributes of the shipping order. It contains the data needed to define the custom attributes of a line of the shipping order from the ERP. | +| | | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | | Transport | No | Group | Data about the line transport of the shipping order. It contains the data necessary to define the transport of a line of the shipping order from the ERP. | +| | | | AgencyCode | No | string(50) | Agency to make the shipment. Agency code must exists in the WMS. Otherwise the WMS will return an error. | +| | | | TransportType | No | string(65) | Transport type to make the shipment. | +| | CustomAttribute | No | Group | Custom attributes for the shipping order. | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | CreationDateOnERP | No | DateTime | Creation date of the shipping order in the ERP. | +| | Address | No | Group | Data about the shipping address of the shipping order. It contains the necessary data to define the shipping address of the shipping order from the ERP. | +| | | ZipCode | No | string(65) | Address ZIP Code. | +| | | AddressLine | No | string(65) | First address line. | +| | | AddressLine2 | No | string(65) | Extra address line. | +| | | City | No | string(65) | Address city. | +| | | State | No | string(65) | Address state. | +| | | Country | No | string(65) | Address country. (Two-letter ISO country code). | +| | | Comment | No | string(1000) | Address comment. | +| | ShipExpiredStock | No | bool | Indicates whether the order lines ship expired stock. If it is 1 (true) it will be assigned to all the lines of the order only expired stock. Otherwise the order ships unexpired stock. | +| | PrepackagingConfiguration | No | Group | Data about the prepackaging configuration of the shipping order. It contains the necessary data to define the prepackaging configuration of the shipping order from the ERP. | +| | | Operation | No | Enumeration | Operation to do. Possibles values: 0 (Create), 1 (Update), 2 (Delete), 3 (UPSERT).. | +| | | PrepackagingProcess | No | Enumeration | Indicates the process in which the preapackaging is performed (Picking, Consolidation o Packing). Posibles valores: 0 (Picking), 1 (Consolidation), 2 (Packing). | +| | | PrepackagingWorkingMode | No | Enumeration | If it is NonStrict, it enables the possibility to modify the prepackaging during the process, creating new containers or using different container types than those indicated. Possible values: 0 (Strict), 1 (NonStrict). If it is not filled, the value Strict will be taken by default. | +| | | TransactionalLineList | No | bool | Indicator of transactionality for the line list. If 1 (true), the whole list must be treated as an atomic transaction. If 0 (false), each element must be individually transactioned. | +| | | CompleteLineList | No | bool | Indicator of completeness for the line list. If 1 (true), the whole list must be treated as the only lines allowed for the shipping order. If 0 (false), more lines appart from those in the list can exist for this shipping order. | +| | | PrepackagingContainersList | No | List | List of prepackaging containers. | +| | | | Operation | No | Enumeration | Operation to do. Possibles values: 0 (Create), 1 (Update), 2 (Delete), 3 (UPSERT). | +| | | | ContainerType | No | string(50) | Container type code. It must be registered in EasyWMS. Otherwise an error will occur. | +| | | | PrepackagingLines | No | List | List of prepackaging lines for this outbound order. | +| | | | | Operation | No | Enumeration | Operation to do. Possibles values: 0 (Create), 1 (Update), 2 (Delete), 3 (UPSERT). | +| | | | | LineQuantity | No | decimal | Quantity to be located of the stock of the corresponding line in the container. It must be a positive number greater than 0. | +| | | | | OrderLineNumber | No | long | The order number of the shipping order line. Corresponds to the LineNumber field. It must be unique per container. Otherwise, an error will be reported. It is the key unique identifier of the prepackaging line for operations U, D and S. | +| | | | OrderContainer | No | long | The order number of the container for the shipping order. It must be a positive number greater than 0. It must be unique in shipping order. Otherwise, an error will be reported. It is the key unique identifier for U, D, and S operations. | +| | OwnerCode | No | string(50) | Code of the owner to whom the shipping order belongs. You must reference an existing owner in the system, otherwise error will be reported. | + +##### Routes - RUT + +**Message type**: RUT (Routes) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.Expeditions.Contracts.Commands.RouteErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message allows creating, modifying, deleting and upserting the routes and shipping orders managed in Easy WMS. - Routes created with this message, will have _ReceivedFromERP_ set true, and will be completely created so its status will be _Waiting_. - It is not allowed to change the _Site_ in existing routes - Only routes created by RUT message could be deleted or modified using RUT messages with operations Update (1), Delete (2) or Upsert (3) - When deleting, not all data is necessary but only primary key data (marked in red). - When adding or removing shipping orders tothe route orders list, or cancelling the route itself, the order will be removed or added from the route list, but not from the Easy WMS system. - When not any dock is set, the default shipping dock for the site is used (when existing) - Shipping orders included into the _SORs_ 1..n group, can be existing shipping orders or new ones, which would be created in the system. Existing ones will inherit from the route its priority, expected dock, carrier, and autorelease date, as well as being released, stopped, or paused according to the route current state. - SOR elements into the route _SORs_ group will be treated as if received in separated SOR messages including them into the route, except for priority, autorelease date and expected dock which will be the same as in the route. - When _SORs_ group attribute _transactional_ is set true, if any order import fails, thre route shouldn’t be created. Otherwise (_transactional false_) the route will be created without the order that fails. - It’s not mandatory to include the lines of the outbound order. If not included, the existing ones are ketp. + +**Structure**: + +**RUT** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| IgnoreNulls | No | bool | Flag to ignore null values. If it is set to true, null values are not modified in the upsert and update operations. | +| **Operation** | **Yes** | Enumeration | Operation to perform. +0: Create, 1: Update, 2: Delete, 3: Upsert | +| **Code** | **Yes** | string(50) | Route code. +When a non-existing value is included and an ooperation 0 (Create) or 3 (Upsert) is performed, this will be created. | +| NewCode | No | string(50) | New route code. +Only used when a modification is performed 1 (Update), 3 (Upsert). | +| **Site** | **Yes** | string(50) | Warehouse site code. +Has to be an existing site, and it is not allowed to modify it. | +| Data | No | Group | Data about the route. Contains all necessary data to define an route from the ERP | +| | Priority | No | Enumeration | Priority for the route and its orders. +Possible values: 0 (Urgente), 1 (Alta), 2 (Normal), 3 (Baja), 4 (Muy baja). | +| | Document | No | string(65) | Route document name. | +| | CommodityType | No | string(65) | Commodity type. | +| | Driver | No | Group | Driver data of the route. | +| | | AgencyCode | No | string(50) | Agency code associated to this route. +Code has to exist in the system, or an error will be notified. | +| | | DriverName | No | string(65) | Driver name. | +| | | TruckPlate | No | string(50) | Truck license plate. | +| | | TrailerPlate | No | string(50) | Trailer license plate. | +| | Planning | No | Group | Planning data of the route. | +| | | EstimatedLoadDate | No | DateTime | Estimated load date and time. +UTC date-time format. | +| | | EstimatedDeliveryDate | No | DateTime | Estimated delivery date and time. +UTC date-time format. | +| | | AutoReleaseDate | No | DateTime | Automatic release date and time. When set, route will be auto-released in EasyWMS. Route auto-release date takes priority over shipping order auto-release date . +UTC date-time format. | +| | | ExpectedDockStationCode | No | string(50) | Expected load dock code. +The dock has to exist in the system or an error will be notified. | +| | | AssignedDockStationCode | No | string(50) | Assigned load dock code. +The dock has to exist in the system or an error will be notified. | +| | TransactionalSorList | No | bool | Indicator of transactionality for the sor list. If it is true, the whole list must be treated as an atomic transaction. +If it is false, each element must be individually transactioned. | +| | CompleteSorList | No | bool | Indicator of completeness for the sor list. In case it is true, the whole list must be treated as the only sors allowed for the route. +If it is false, more sors appart from those in the list can exist for this route. | +| | SorList | No | List | List of outbound orders for this route. | +| | | Operation | No | Enumeration | Operation to perform with the shipping order data. Operation 2 (Delete) doesn’t delete the order; it just removes it from the route. +An error might raise if the operation is not allowed for the order’s status. +Possible values: 0 (Create), 1 (Update), 2 (Delete), 3 (Upsert). If it’s not included, it will take the value 3 (Upsert) by default. | +| | | **Code** | **Yes** | string(50) | Outbound order code. +When a non-existing value is included and a creation operation 0 (Crear) is performed, the order will be created. +If the code already exists in the system, it will include the order into the route. | +| | | OutboundType | No | Enumeration | The outbound order’s type. It is mandatory when creating a new outbound order. +Possible values: 0 (Customer), 1 (Return), 2 (Transfer), 4 (DirectTransfer). | +| | | AccountCode | No | string(50) | The account code for when the order type is Customer. associated to this outbound order. +Code has to exist in Easy WMS, or an error will be notified. +It cannot be null or empty when the type of the order is Customer. | +| | | OutboundClassCode | No | string(50) | Outbound class code. It will only be taken into account when the order type is Customer. +The code has to be an existing shipping class code which can be received from ERP or an error will be notified. | +| | | SupplierCode | No | string(50) | Supplier code for when the order type is Return. +Code has to exist in the system, or an error will be notified. Only used when shipping order type is Return. | +| | | WarehouseToCode | No | string(50) | Warehouse code where the stock will be transfered when the order type is Transfer or DirectTransfer. +The site has to exist in the system, or an error will be notified. Only used when shipping order type is Transfer or DirectTransfer. | +| | | Document | No | string(65) | Name of the delivery note file for the outbound order. | +| | | Source | No | string(65) | Free text to describe the outbound order’s origin. | +| | | Description | No | string(1000) | Outbound order’s description. | +| | | DeliveryInstructions | No | string(1000) | Outbound order’s delivery instructions. | +| | | ValidDate | No | DateTime | The date after which the order is considered outdated. +UTC date-time format. | +| | | ShipExpiredStock | No | bool | If it is true (1) it will be assigned to all the lines of the order only expired stock. Otherwise the order ships unexpired stock. +It takes the value false (0) by default. | +| | | FollowSequence | No | bool | If it’s true (1) the sequence indicated by the outbound order lines will be followed. False (0) otherwhise. +It takes the value 0 (false) by default. | +| | | StopNumber | No | long | Stop number where outbound order will be delivered. +Positive number greater than zero. | +| | | EstimatedNumCont | No | long | Estimated number of containers that will be shipped in the order. +Positive number greater than zero. | +| | | PlannedLoadDate | No | DateTime | Expected load date. +UTC date-time format. | +| | | PlannedShippingDate | No | DateTime | Estimated shipping date. +UTC date-time format. | +| | | PackingLocationCode | No | string(50) | Packing location code. +Packing location has to exist in the system, or an error will be notified. | +| | | ClientContainerTypeCode | No | string(50) | Expected client container types. +It must match an existing container type, or an error will be notified. | +| | | ClientContainerNumLabels | No | long | Needed number of labels for the client containers. +Positive number greater than 0. | +| | | ShipReportNumCopies | No | long | Number of copies to print of outbound order report. +Positive number greater than 0. | +| | | PackingListNumCopies | No | long | Number of copies to print of packing list. +Positive number greater than 0. | +| | | TransactionalLineList | No | bool | Indicator of transactionality for the line list. If it is true, the whole list must be treated as an atomic transaction. +If it is false, each element must be individually transactioned. | +| | | CompleteLineList | No | bool | Indicator of completeness for the line list. In case it is true, the whole list must be treated as the only lines allowed for the inbound order. +If it is false, more lines appart from those in the list can exist for this inbound order. | +| | | LineList | No | List | List of lines for this outbound order. | +| | | | Operation | No | Enumeration | Operation to be performed with the data of each line. An error may be reported if the operation is not allowed for the shipping order status. Operation 2 (Delete) will involve a deletion when the shipping order is in creation or a cancellation of the line when the shipping order is released. Possible values: 0 (Create), 1 (Update), 2 (Delete), 3 (Upsert). | +| | | | **LineNumber** | **Yes** | long | Line number. It must be unique in shipping order and greater than 0. Otherwise, an error will be reported. It is the line’s unique key identifier for operations 1 (Update), 2 (Delete) and 3 (Upsert). | +| | | | MaxLots | No | long | Maximum number of lots that can be shipped if the product has a lot in its logistics profile. Positive number greater than 0. | +| | | | ProductCode | No | string(50) | Code of the ordered item. If a container is also indicated, it indicates where the item is wanted. You must reference an existing item code in the system. Otherwise, an error will be reported. It is mandatory if ContainerCode does not exist. | +| | | | OwnerCode | No | string(50) | Owner of the ordered item. It is not necessary when what is being ordered is a container. In case of not indicating owner when an item is being ordered, it is considered: a) If there is only one owner for the indicated item, it will be this.b) If there are several owners for the indicated item and one is marked as default, it will be this.c) Otherwise an error will occur. You must reference an existing owner code in the system, otherwise an error will be reported. Owner of the ordered item. This is required only when a value is entered in ProductCode. | +| | | | ContainerCode | No | string(50) | Free text that references the code of the ordered container if a specific one is required. If an item is also requested, indicate which container you want that item from. It is mandatory if there is no ProductCode. | +| | | | Comment | No | string(1000) | Comment for the shipping order line. | +| | | | Quantity | No | Group | Data about the quantity of the line of the shipping order. It contains the data needed to define the quantity of a line of the shipping order from the ERP. | +| | | | | QuantityOrdered | No | decimal | Quantity to ship, in the specified UoM. Positive number greater than 0 | +| | | | | UnitOfMeasureCode | No | string(50) | Unit of Measure of the line quantity. Has to be an existing UoM into Easy WMS, or an error will be notified. | +| | | | | RequiredUnitOfMeasure | No | bool | When 1 (true), the stock has to be shipped in the specified UoM When 0 (false), the stock quantity could be shipped in a different UoM Default value is 0 (false) | +| | | | | QuantityToReserve | No | decimal | Quantity to be reserved before shipping in the specified UoM. Positive number greater than 0. | +| | | | | QuantityRejected | No | decimal | ejected to be shipped quantity in the specified UoM. Positive number greater than 0. | +| | | | | AllowAssignStockExcess | No | bool | When 1 (true) it is allowed to ship over quantity, when 0 (false) it is not.Default value is 0 (false). | +| | | | Terms | No | Group | Data about the terms of the shipping order line. It contains the data necessary to define the terms of a line of the shipping order from the ERP. | +| | | | | FavouriteContainerTypeCode | No | string(50) | Preferred container type when shipping containers.Only used when no value set in ContainerCode. Has to be an existing container type into EasyWMS, or an error will be notified. | +| | | | | FavouriteUnitOfMeasureCode | No | string(50) | Preferred UoM (Unit of Measure) to ship the stock.It must be equal to that specified in UnitOfMeasureCode or to break it. Has to be an existing UoM into Easy WMS, or an error will be notified. | +| | | | | CatchWeight | No | bool | Indicates that the weight of the stock must be recorded in shipment 1 (true), 0 (false) otherwise. | +| | | | | RequiredToShip | No | bool | When 1 (true), this line is mandatory to ship the whole order. When not introduced, default value is 0 (false). | +| | | | | IsCritical | No | bool | When 1 (true), the line must be served complete. If it cannot be served complete, none of the line is served. When not introduced, default value is 0 (false). | +| | | | | UseAlternativeProducts | No | bool | | +| | | | | Status | No | Group | Data about the stock status required by the line of the shipping order. It contains the necessary data to define the required stock status of a line of the output order from the ERP. | +| | | | | | FavouriteStockStatusCode | No | string(50) | Preferred stock status for this line. Has to be an existing status code into EasyWMS, or an error will be notified. Only used when LneTrmStaReq is not set. | +| | | | | | RequireStockStatusCode | No | string(50) | Mandatory stock status for this line. Has to be an existing status code into EasyWMS, or an error will be notified. | +| | | | | | RejectStockStatusCode | No | string(50) | Not allowed stock status for this line. Has to be an existing status code into EasyWMS, or an error will be notified. | +| | | | | ContainerTypeCode | No | string | Type of container required to ship. It must reference an existing container type on the system, otherwise the error will be reported. | +| | | | Customer | No | Group | Data about the line of the shipping order of the customer ERP. It contains the necessary data to indicate the customer ERP information of the shipping order line. | +| | | | | ProductCode | No | string(65) | Open text to specify the stock customer code. | +| | | | | LineNo | No | long | Open text to specify the customer stock line number. | +| | | | AltProduct | No | Group | Data about the alternative product the line of the shipping order. It contains the necessary data to define the alternative product of a line of the shipping order from the ERP. | +| | | | | ProductCode | No | string(50) | Alternative item code. Has to be an existing item code, owned by the same owner into Easy WMS, or an error will be notified. | +| | | | | FromFactor | No | decimal | Units of the original item that are replaced with the quantity specified in ToFactor specified in the item base UoM. Positive number greater than 0. | +| | | | | ToFactor | No | decimal | Units of the substitutive item that replace the quantity specified in FromFactor. Positive number greater than 0. | +| | | | | UnitOfMeasureCodeTo | No | string(50) | UoM used to describe the quantity specified in ToFactor. Has to be an existing UoM into Easy WMS, or an error will be notified. | +| | | | PurchasePrice | No | Group | Data about the price of the product line of the shipping order. It contains the necessary data to define the price of the product of a line of the shipping order from the ERP. | +| | | | | **Quantity** | **Yes** | decimal | Informative field with the line total price. Positive number greater than 0. | +| | | | | **Currency** | **Yes** | string(65) | Currency related to LneCstPurchase. Only when Quantity is set. | +| | | | LogisticAttributes | No | Group | Data about the line logistic attributes of the shipping order. It contains the necessary data to define the logistic attributes of a line of the shipping order from the ERP. | +| | | | | LotCode | No | string(65) | Mandatory LOT to be shipped. | +| | | | | SerialNumber | No | string(65) | Mandatory serial number to be shipped. | +| | | | | ProductionDate | No | DateTime | Earlier production date to be shipped. UTC date-time format | +| | | | | ExpirationDate | No | DateTime | Earlier expiration date to be shipped. UTC date-time format. | +| | | | | BestBeforeDate | No | DateTime | Earlier best before date to be shipped. UTC date-time format. | +| | | | | DaysOfLife | No | long | Lower shelf life to be shipped. Positive number greater than 0. | +| | | | | Quality | No | string(65) | Mandatory quality to be shipped. | +| | | | | Color | No | string(65) | Mandatory color to be shipped. | +| | | | | Source | No | string(65) | Mandatory origin to be shipped. | +| | | | | Version | No | string(65) | Mandatory version to be shipped. It is mandatory in case of requesting a non assembled kit item, and must correspond with an enabled version of the kit. | +| | | | | ProductionMethod | No | string(65) | Mandatory production method to be shipped. | +| | | | | PostProductionTreatment | No | string(65) | Mandatory post-production treatment to be shipped. | +| | | | | Size | No | string(65) | Mandatory size to be shipped. | +| | | | | Weight | No | decimal | Mandatory weight to be shipped. Decimal number greater than 0. | +| | | | CustomAttribute | No | Group | Data about the custom line attributes of the shipping order. It contains the data needed to define the custom attributes of a line of the shipping order from the ERP. | +| | | | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | | | Transport | No | Group | Data about the line transport of the shipping order. It contains the data necessary to define the transport of a line of the shipping order from the ERP. | +| | | | | AgencyCode | No | string(50) | Agency to make the shipment. Agency code must exists in the WMS. Otherwise the WMS will return an error. | +| | | | | TransportType | No | string(65) | Transport type to make the shipment. | +| | | CustomAttribute | No | Group | Custom attributes for the outbound order | +| | | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | | OwnerCode | No | string | Outbound owner code. | +| | CustomAttribute | No | Group | Custom attributes for the route. | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | + +##### Work Orders - WOR + +**Message type**: WOR (Work Order received) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.Contracts.Commands.WorkOrderErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: With this message we can get the information about the work orders received to prepare. - Work Orders will be created and their status will be _Waiting_. - When we receive the information to cancel one work order, we only need the fields marked in red. - It´s not allowed to modify the Site for an existing work order. - Work orders received from the ERP will be created with the _ReceivedFromERP_ field to _true_. - From the ERP, we can only change de work orders created in the ERP. - If the work order is a _Kitting_ or _Dekitting_ order, the fields _ItemCode_, _KitItemVersion_ and _OwnerCode_ will be requeired. - The _OBL_ column defines the obligation for the field to be informed. If the field is not informed and it is an update, we must pay attention to the value of the _ignorenull_ tag. + +**Structure**: + +**WOR** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| IgnoreNulls | No | bool | WOR mandatory boolean attribute. When true (1) null or not existing data fields keep its original value; when false (0) data fields are set to void. | +| **Operation** | **Yes** | Enumeration | Operation to perform with the work order data. An error may be reported if the operation is not allowed for the state of the order. +Operation 2: Delete will involve cancellation in all cases, except when already we have quantity mounted / disassembled that it will be a close. +Allowed values: 0: Create, 1: Update, 2: Delete, 3: UPSERT. | +| **Code** | **Yes** | string(50) | Work order. +If we try to create an order with 0: Create or 3: UPSERT, the order will be created successfully. If the operations is 1: Update or 2: Delete, the system will throw an error message. | +| **Site** | **Yes** | string(50) | Site. +The site should exists in the system and it is not possible to modify it. | +| Data | No | Group | Data about the work order. It contains all necessary data to define an work order from the ERP. | +| | **Priority** | **Yes** | Enumeration | Order priority. +Possible values: Urgent, High, Normal, Low, VeryLow. | +| | **WorkOrderType** | **Yes** | Enumeration | Work order type. +If the order is Kitting or Dekitting type, the ItemCode field, KitItemVersion field and OwnerCode field are required. | +| | WorkLocationCode | No | string(50) | Work location code. +If the work location received does not exist, or is not a valid work zone, the system throws an error message. | +| | ItemCode | No | string(50) | Item Code. +It must reference an existing item code, otherwise you will be notified of an error. | +| | OwnerCode | No | string(50) | Owner. +It must reference an existing provider code in the system, otherwise you will be notified of error. | +| | KitItemVersion | No | string(50) | Kit version. +It must reference an existing version in the system for the requested kit. | +| | **Quantity** | **Yes** | long | Ordered quantity. +Natural number greater than 0. | +| | Description | No | string(1000) | Description. | +| | CustomAttribute | No | Group | Custom attributes for the work order. | +| | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | + +#### Exported messages + +Messages that will be sent in Export direction (from MAP to the ERP). + +##### Shipping order status change - SOC + +**Message type**: SOC (Shipping order status change) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: With this message, Easy WMS notifies any status change of an existing shipping order. + +- Shipping orders that has been grouped o merged, once grouped or merged, don’t changes of status, so changes in the status of their preparation (_Released, Working, Paused_) shouldn’t be expected like for orders non grouped or merged. + +**Structure**: + +**SOC01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Warehouse code of the shipping order | +| **SorCode** | **Yes** | string(50) | Shipping order code | +| **Status** | **Yes** | string | Current status of the shipping order. Possible values: Secured, Waiting, Assigned, Release, Working, Paused, StockFailure, Merged, Grouped | +| **UpdateDate** | **Yes** | DateTime | UTC date and time of the status change of the shipping order | + +##### Shipping order close or finalization - SOF + +For the shipping order close or finalization message there are two versions: [SOF01](communications/EasyWMS_WebApi_en.html.md#SOF01) y [SOF02](communications/EasyWMS_WebApi_en.html.md#SOF02) + +###### Shipping order close or finalization - SOF01 + +**Message type**: SOF (Shipping order close or finalization) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: With this message, Easy WMS notifies the stock shipped related to an existing shipping order in the system, because the order has been closed or finished. + +- When the shipping order has been created by a RUT message received from ERP, route code will be part of the finalization SOF data. +- When partial closing is used, each closing will generate a SOF message containing the closing number and only the shipping order lines closed. +- When the close of an outbound order is forced but it didn’t ship any stock, no order lines will be sent. +- When cancelling shipping orders, no order lines will be sent in the SOF message (all pending lines will be cancelled). + +**Structure**: + +**SOF01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the warehouse site where the shipping is done | +| **SorCode** | **Yes** | string(50) | Shipping order code | +| **Status** | **Yes** | string | Status in which the order has been closed or finalized. Finalization statuses are Cancelled and Closed. Possible values: Waiting, Release, Working, Paused, StockFailure, Cancelled, Closed, Secured | +| ClosingNum | No | long | Closing number. Positive integer greater than 0. It will be mandatory when what has occurred is a closing | +| Document | No | string(65) | Delivery note | +| Source | No | string(65) | Open text to describe the shipping | +| ShipExpiredStock | No | bool | Order requires expired stock or not | +| Transport | No | Transport | Transport data of the shipping order | +| **Preparation** | **Yes** | Group | Preparation data of the shipping order | +| | PrpReleaseDate | No | DateTime | Shipping order release date and time. UTC date-time format | +| | **PrpContainers** | **Yes** | long | LPNs shipped into the shipping order. Positive integer greater than or equal to 0 | +| | PrpContType | No | string(50) | Type of expected client containers indicated on the shipping order | +| | PrpDock | No | string(50) | Dock assigned for order loading | +| | PrpShippingDate | No | DateTime | Estimated shipping date. UTC date-time format | +| Delivery | No | Group | Delivery data of the shipping order | +| | DlvTrackingNumber | No | string(1000) | Tracking number of the delivery | +| | DlvCarrierCode | No | string(50) | Carrier for current delivery | +| Lines | No | Group | Shipping order lines | +| | **Line** | **Yes** | List | Shipping order line | +| | | **LneNumber** | **Yes** | long | Line number. Unique number in the message | +| | | LneItemCode | No | string(50) | Ordered stock item code for this line. Mandatory when LneContCode has no value | +| | | LneContCode | No | string(50) | Requested container code. This field will contain value when LneItemCode does not have one | +| | | LneOwnerCode | No | string(50) | Owner for this ordered stock line | +| | | LneComment | No | string(1000) | Comment for the stock line | +| | | LneQuantity | No | Group | Defines the quantity of the line. Only to be used when LneItemCode has a value | +| | | | **LneQtyOrder** | **Yes** | decimal | Ordered quantity of the item, in the indicated UoM. Positive number greater than 0 | +| | | | LneQtyFree | No | decimal | Quantity of the item shipped free of charge, in the indicated UoM. Positive number greater than 0 | +| | | | **LneQtyUoMCode** | **Yes** | string(50) | Unit of measure in which line quantities are referenced | +| | | LneCustomerData | No | Group | Line customer data | +| | | | LneCtmCode | No | string(65) | Open text to specify the stock customer code | +| | | | LneCtmLineNumber | No | long | Número de línea de pedido correspondiente para el cliente | +| | | LneCost | No | Group | Cost data of line items | +| | | | LneCstPurchase | No | decimal | Information field with the total cost of the line. Positive number greater than zero | +| | | | LneCstCurrency | No | string(65) | Currency in which the cost is indicated. It will only be filled in if LneCstPurchase has value | +| | | LneAttributes | No | LneAttributesOut | Logistic attributes required by the line | +| | | LneCustomAttributes | No | LneCustomAttributes | Custom attributes of the line | +| | | LneDetails | No | Group | Datos de los stocks expedidos. Sólamente se utilizará cuando LneContCode no tenga valor | +| | | | LneDetail | No | List | Shipped stock data | +| | | | | LneDItemCode | No | string(50) | Shipped stock item code for this line | +| | | | | LneDOwnerCode | No | string(50) | Shipped stock owner for this line | +| | | | | **LneDIsAlternative** | **Yes** | bool | Indicates whether the item shipped for the line is an alternative item (true, 1) or the ordered item (false, 0). | +| | | | | LneDWeight | No | decimal | Stock weight recorded when shipping. Positive number greater than 0 | +| | | | | LneDClientContCode | No | string(50) | LPN (license plate number) for the shipped stock line | +| | | | | LneDQuantity | No | Group | Shipped quantity data | +| | | | | | **LneDQtyShipped** | **Yes** | decimal | Shipped quantity (in the specified UoM). Positive number greater than 0 | +| | | | | | **LneDQtyUoMCode** | **Yes** | string(50) | UoM (Unit of Measure) of the line quantity shipped | +| | | | | LneDAttributes | No | Group | Logistic attribute shipped | +| | | | | | LneDAttLot | No | string(128) | Lot logistic attribute shipped | +| | | | | | LneDAttSN | No | string(128) | Serial number logistic attribute shipped | +| | | | | | LneDAttProdDate | No | DateTime | Production date logistic attribute shipped. UTC date-time format | +| | | | | | LneDAttExpDate | No | DateTime | Expiration date logistic attribute shipped. UTC date-time format | +| | | | | | LneDAttBBDate | No | DateTime | Best before date logistic attribute shipped. UTC date-time format | +| | | | | | LneDAttDaysLife | No | DateTime | Shelf life data logistic attribute shipped. UTC date-time format | +| | | | | | LneDAttQuality | No | string(128) | Quality logistic attribute shipped | +| | | | | | LneDAttColor | No | string(128) | Color logistic attribute shipped | +| | | | | | LneDAttSource | No | string(128) | Origin logistic attribute shipped | +| | | | | | LneDAttVersion | No | string(128) | Version logistic attribute shipped | +| | | | | | LneDAttProdMethod | No | string(128) | Production method logistic attribute shipped | +| | | | | | LneDAttPostTreat | No | string(128) | Post-production treatment logistic attribute shipped | +| | | | | | LneDAttSize | No | string(128) | Size logistic attribute shipped | +| | | | | LneDCustomAttributes | No | Group | Custom attributes shipped | +| | | | | | LneDCstAtt01 | No | string(1000) | Custom attribute 1 | +| | | | | | LneDCstAtt02 | No | string(1000) | Custom attribute 2 | +| | | | | | LneDCstAtt03 | No | string(1000) | Custom attribute 3 | +| | | | | | LneDCstAtt04 | No | string(1000) | Custom attribute 4 | +| | | | | | LneDCstAtt05 | No | string(1000) | Custom attribute 5 | +| | | | | | LneDCstAtt06 | No | string(1000) | Custom attribute 6 | +| | | | | | LneDCstAtt07 | No | string(1000) | Custom attribute 7 | +| | | | | | LneDCstAtt08 | No | string(1000) | Custom attribute 8 | +| | | | | | LneDCstAtt09 | No | string(1000) | Custom attribute 9 | +| | | | | | LneDCstAtt10 | No | string(1000) | Custom attribute 10 | +| | | | | | LneDCstAtt11 | No | string(1000) | Custom attribute 11 | +| | | | | | LneDCstAtt12 | No | string(1000) | Custom attribute 12 | +| | | | | | LneDCstAtt13 | No | string(1000) | Custom attribute 13 | +| | | | | | LneDCstAtt14 | No | string(1000) | Custom attribute 14 | +| | | | | | LneDCstAtt15 | No | string(1000) | Custom attribute 15 | +| | | | | | LneDCstAtt16 | No | string(1000) | Custom attribute 16 | +| | | | | | LneDCstAtt17 | No | string(1000) | Custom attribute 17 | +| | | | | | LneDCstAtt18 | No | string(1000) | Custom attribute 18 | +| | | | | | LneDCstAtt19 | No | string(1000) | Custom attribute 19 | +| | | | | | LneDCstAtt20 | No | string(1000) | Custom attribute 20 | +| | | LneVASDetails | No | Group | List of VAS applied to the line | +| | | | LneVASDetail | No | List | Data of VAS applied to the line | +| | | | | **LneVASsTemplate** | **Yes** | string(50) | VAS template applied to the line | +| | | | | LneVASsPreparedQuantity | No | decimal | Quantity of the line to which the VAS template has been applied. It will only be filled in case the applied VAS template is on stock | +| | | | | LneVASsComment | No | string(1000) | Additional VAS comment applied to the line | +| CustomAttributes | No | CustomAttributes | Custom attributes of the shipping order | + +###### Shipping order close or finalization - SOF02 + +**Message type**: SOF (Shipping order close or finalization) + +**Import / Export**: Export + +**Version**: 02 + +**Description**: With this message, Easy WMS notifies the stock shippied related to an existing shipping order in the system, because the order has been closed or finished. + +- When the shipping order has been created by a RUT message received from ERP, route code will be part of the finalization SOF data. +- When partial closing is used, each closing will generate a SOF message containing the closing number and only the shipping order lines closed. +- When the close of an outbound order is forced but it didn’t ship any stock, no order lines will be sent. +- When cancelling shipping orders, no order lines will be sent in the SOF message (all pending lines will be cancelled). + +**Structure**: + +**SOF02** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the warehouse site where the shipping is done | +| **SorCode** | **Yes** | string(50) | Shipping order code | +| **Status** | **Yes** | string | Status in which the order has been closed or finalized. Finalization statuses are Cancelled and Closed. Possible values: Waiting, Release, Working, Paused, StockFailure, Cancelled, Closed, Secured | +| **OutboundType** | **Yes** | string | The outbound order’s outbound type. Possible values: Customer, Return, Transfer, Manual, DirectTransfer, KitAssembly, Manufacturing, KitDisassembly, Replenishment, Desk | +| ClosingNum | No | long | Closing number. Positive integer greater than 0. It will be mandatory when what has occurred is a closing | +| Document | No | string(65) | Delivery note | +| Source | No | string(65) | Open text to describe the shipping | +| ShipExpiredStock | No | bool | Order requires expired stock or not | +| Transport | No | Transport | Transport data of the shipping order | +| **Preparation** | **Yes** | Group | Preparation data of the shipping order | +| | PrpReleaseDate | No | DateTime | Shipping order release date and time. UTC date-time format | +| | **PrpContainers** | **Yes** | long | LPNs shipped into the shipping order. Positive integer greater than or equal to 0 | +| | PrpContType | No | string(50) | Type of expected client containers indicated on the shipping order | +| | PrpDock | No | string(50) | Dock assigned for order loading | +| | PrpShippingDate | No | DateTime | Estimated shipping date. UTC date-time format | +| Lines | No | Group | Shipping order lines | +| | **Line** | **Yes** | List | Shipping order line | +| | | **LneNumber** | **Yes** | long | Line number. Unique number in the message | +| | | LneItemCode | No | string(50) | Ordered stock item code for this line. Mandatory when LneContCode has no value | +| | | LneContCode | No | string(50) | Requested container code. This field will contain value when LneItemCode does not have one | +| | | LneOwnerCode | No | string(50) | Owner for this ordered stock line | +| | | LneComment | No | string(1000) | Comment for the stock line | +| | | LneQuantity | No | Group | Defines the quantity of the line. Only to be used when LneItemCode has a value | +| | | | **LneQtyOrder** | **Yes** | decimal | Ordered quantity of the item, in the indicated UoM. Positive number greater than 0 | +| | | | LneQtyFree | No | decimal | Quantity of the item shipped free of charge, in the indicated UoM. Positive number greater than 0 | +| | | | **LneQtyUoMCode** | **Yes** | string(50) | Unit of measure in which line quantities are referenced | +| | | LneCustomerData | No | Group | Line customer data | +| | | | LneCtmCode | No | string(65) | Open text to specify the stock customer code | +| | | | LneCtmLineNumber | No | long | Número de línea de pedido correspondiente para el cliente | +| | | LneCost | No | Group | Cost data of line items | +| | | | LneCstPurchase | No | decimal | Information field with the total cost of the line. Positive number greater than zero | +| | | | LneCstCurrency | No | string(65) | Currency in which the cost is indicated. It will only be filled in if LneCstPurchase has value | +| | | LneAttributes | No | LneAttributesOut | Logistic attributes required by the line | +| | | LneCustomAttributes | No | LneCustomAttributes | Custom attributes of the line | +| | | LneDetails | No | Group | Datos de los stocks expedidos. Sólamente se utilizará cuando LneContCode no tenga valor | +| | | | LneDetail | No | List | Shipped stock data | +| | | | | LneDItemCode | No | string(50) | Shipped stock item code for this line | +| | | | | LneDOwnerCode | No | string(50) | Shipped stock owner for this line | +| | | | | **LneDIsAlternative** | **Yes** | bool | Indicates whether the item shipped for the line is an alternative item (true, 1) or the ordered item (false, 0). | +| | | | | LneDWeight | No | decimal | Stock weight recorded when shipping. Positive number greater than 0 | +| | | | | LneDClientContCode | No | string(50) | LPN (license plate number) for the shipped stock line | +| | | | | LneDQuantity | No | Group | Shipped quantity data | +| | | | | | **LneDQtyShipped** | **Yes** | decimal | Shipped quantity (in the specified UoM). Positive number greater than 0 | +| | | | | | **LneDQtyUoMCode** | **Yes** | string(50) | UoM (Unit of Measure) of the line quantity shipped | +| | | | | LneDAttributes | No | Group | Logistic attribute shipped | +| | | | | | LneDAttLot | No | string(128) | Lot logistic attribute shipped | +| | | | | | LneDAttSN | No | string(128) | Serial number logistic attribute shipped | +| | | | | | LneDAttProdDate | No | DateTime | Production date logistic attribute shipped. UTC date-time format | +| | | | | | LneDAttExpDate | No | DateTime | Expiration date logistic attribute shipped. UTC date-time format | +| | | | | | LneDAttBBDate | No | DateTime | Best before date logistic attribute shipped. UTC date-time format | +| | | | | | LneDAttDaysLife | No | DateTime | Shelf life data logistic attribute shipped. UTC date-time format | +| | | | | | LneDAttQuality | No | string(128) | Quality logistic attribute shipped | +| | | | | | LneDAttColor | No | string(128) | Color logistic attribute shipped | +| | | | | | LneDAttSource | No | string(128) | Origin logistic attribute shipped | +| | | | | | LneDAttVersion | No | string(128) | Version logistic attribute shipped | +| | | | | | LneDAttProdMethod | No | string(128) | Production method logistic attribute shipped | +| | | | | | LneDAttPostTreat | No | string(128) | Post-production treatment logistic attribute shipped | +| | | | | | LneDAttSize | No | string(128) | Size logistic attribute shipped | +| | | | | LneDCustomAttributes | No | Group | Custom attributes shipped | +| | | | | | LneDCstAtt01 | No | string(1000) | Custom attribute 1 | +| | | | | | LneDCstAtt02 | No | string(1000) | Custom attribute 2 | +| | | | | | LneDCstAtt03 | No | string(1000) | Custom attribute 3 | +| | | | | | LneDCstAtt04 | No | string(1000) | Custom attribute 4 | +| | | | | | LneDCstAtt05 | No | string(1000) | Custom attribute 5 | +| | | | | | LneDCstAtt06 | No | string(1000) | Custom attribute 6 | +| | | | | | LneDCstAtt07 | No | string(1000) | Custom attribute 7 | +| | | | | | LneDCstAtt08 | No | string(1000) | Custom attribute 8 | +| | | | | | LneDCstAtt09 | No | string(1000) | Custom attribute 9 | +| | | | | | LneDCstAtt10 | No | string(1000) | Custom attribute 10 | +| | | | | | LneDCstAtt11 | No | string(1000) | Custom attribute 11 | +| | | | | | LneDCstAtt12 | No | string(1000) | Custom attribute 12 | +| | | | | | LneDCstAtt13 | No | string(1000) | Custom attribute 13 | +| | | | | | LneDCstAtt14 | No | string(1000) | Custom attribute 14 | +| | | | | | LneDCstAtt15 | No | string(1000) | Custom attribute 15 | +| | | | | | LneDCstAtt16 | No | string(1000) | Custom attribute 16 | +| | | | | | LneDCstAtt17 | No | string(1000) | Custom attribute 17 | +| | | | | | LneDCstAtt18 | No | string(1000) | Custom attribute 18 | +| | | | | | LneDCstAtt19 | No | string(1000) | Custom attribute 19 | +| | | | | | LneDCstAtt20 | No | string(1000) | Custom attribute 20 | +| | | | | LneDUserDefinedStatus | No | string(50) | User defined stock status | +| | | | | LneDReceptionDefaultStatus | No | string(50) | Receipt status defined during receipt of stock | +| CustomAttributes | No | CustomAttributes | Custom attributes of the shipping order | + +##### Truck loads finalization - LOF + +**Message type**: LOF (Truckload finalization) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: With this message, Easy WMS notifies the finalization of a truck load, specifying included shipping orders and LPNs. - Only correctly loaded trucks will be notified. _Cancelled_ loads will not be notified because stock will not leave the warehouse site. + +**Structure**: + +**LOF01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the warehouse site where the load is done | +| **LoadCode** | **Yes** | string(50) | Load code | +| **LoadDate** | **Yes** | DateTime | Date and time of the load. UTC date-time format | +| RouteCode | No | string(50) | Route that contains the load. Only used when the route was created from a RUT ERP message | +| Dock | No | string(50) | Shipping dock from where the truck was loaded | +| Weight | No | decimal | Weight of the load. Positive number greater than 0 | +| Description | No | string(65) | Load description | +| Comments | No | string(1000) | Load open text comment | +| CommodityType | No | string(1000) | Commodity type | +| Driver | No | Driver | Data about the driver. It contains the necessary data to define the driver from the ERP | +| Bill | No | Group | Data about the bill. It contains the necessary data to define the bill from the ERP | +| | BllName | No | string(1000) | Bill name | +| | BllAddress | No | string(1000) | Bill address | +| | BllZipCode | No | string(50) | Bill address ZIP code | +| | BllCity | No | string(65) | Bill address city | +| | BllState | No | string(65) | Bill state | +| | BllCountry | No | string(65) | Bill address country | +| Containers | No | Group | Data about the containers. It contains the necessary data to define the containers from the ERP | +| | Container | No | List | Data about the container. It contains the necessary data to define the container from the ERP | +| | | CntCode | No | string(50) | Stock LPN (license plate number) sent | +| | | CntType | No | string(50) | Stock container type | +| | | CntSorCode | No | string(50) | Stock shipping order code | +| | | IsSlave | No | bool | If true (value 1) the container is a slave container: It has no stock but fisically exists. If empty, default value is false (value 0) | +| | | Lines | No | Group | Data about the lines of the shipping order. It contains the necessary data to define the lines of the shipping order from the ERP | +| | | | Line | No | List | Data about the line of the shipping order. It contains the necessary data to define the line of the shipping order from the ERP | +| | | | | SorCode | No | string(50) | Shipping order code | +| | | | | **LneNumber** | **Yes** | long | Line number in the shipping order | +| | | | | LneItemCode | No | string(50) | Stock item code | +| | | | | LneOwnerCode | No | string(50) | Stock owner | +| | | | | **LneIsAlternative** | **Yes** | bool | When true (1), an alternative item was sent. When false (0), requested items was sent | +| | | | | LneQtyShipped | No | decimal | Line stock quantity shipped. Positive number greater than 0 | +| | | | | LneQtyUoMCode | No | string(50) | UoM (Unit of Measure) of the line quantity | +| | | | | LneWeight | No | decimal | Weight of the stock of the line. Positive number greater than 0 | +| | | | | LneComment | No | string(1000) | Line open text comment | +| | | | | LneCustomerData | No | Group | Data about the customer. It contains the necessary data to define the customer data from the ERP | +| | | | | | LneCtmCode | No | string(65) | Informative open text customer stock code | +| | | | | | LneCtmLineNumber | No | long | Informative customer order number | +| | | | | LneAttributes | No | LneAttributesOut | Data about the line attributes. It contains the necessary data to define the line attributes from the ERP | +| | | | | LneCustomAttributes | No | LneCustomAttributes | Data about the line custom attributes. It contains the necessary data to define the custom attributes of the line from the ERP | +| | | Containers | No | Group | Data about the containers. It contains the necessary data to define the containers from the ERP | +| Stocks | No | Group | Data about the stock. It contains the necessary data to define the stock from the ERP | +| | Line | No | List | Data about the line of the shipping order. It contains the necessary data to define the line of the shipping order from the ERP | +| | | SorCode | No | string(50) | Shipping order code | +| | | **LneNumber** | **Yes** | long | Line number in the shipping order | +| | | LneItemCode | No | string(50) | Stock item code | +| | | LneOwnerCode | No | string(50) | Stock owner | +| | | **LneIsAlternative** | **Yes** | bool | When true (1), an alternative item was sent. When false (0), requested items was sent | +| | | LneQtyShipped | No | decimal | Line stock quantity shipped. Positive number greater than 0 | +| | | LneQtyUoMCode | No | string(50) | UoM (Unit of Measure) of the line quantity | +| | | LneWeight | No | decimal | Weight of the stock of the line. Positive number greater than 0 | +| | | LneComment | No | string(1000) | Line open text comment | +| | | LneCustomerData | No | Group | Data about the customer. It contains the necessary data to define the customer data from the ERP | +| | | | LneCtmCode | No | string(65) | Informative open text customer stock code | +| | | | LneCtmLineNumber | No | long | Informative customer order number | +| | | LneAttributes | No | LneAttributesOut | Data about the line attributes. It contains the necessary data to define the line attributes from the ERP | +| | | LneCustomAttributes | No | LneCustomAttributes | Data about the line custom attributes. It contains the necessary data to define the custom attributes of the line from the ERP | +| CustomAttributes | No | CustomAttributes | Data about the custom attributes. It contains the necessary data to define the custom attributes from the ERP | + +##### Work Order Finalization - WOF + +**Message type**: WOF (Work order closed or finished) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message is used to notify the ERP of changes in the stock caused by a work order, which has been closed or canceled. + +- If we cancel a work order after any quantity has been processed, the status of the order will be closed status. If any quantity has been yet, the status will be cancelled. + +- This message will be sent only in the work orders created by the ERP. + + +**Structure**: + +**WOF01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Site | +| **WorCode** | **Yes** | string(50) | Work order | +| **Status** | **Yes** | string | Status in which the order has been closed or finished. The finishing status are Cancelled or Closed | +| **WorType** | **Yes** | string | Work order type. If the order is Kitting or Dekitting type, the ItemCode field, KitItemVersion field and OwnerCode field are requeired. With feature UseSameValuesForWorkTypeInWOR01AndWOF01Message enabled possible, values: KitAssembly, KitDisassembly, else Kitting, Dekitting, | +| **WorkLocationCode** | **Yes** | string(50) | Work zone location | +| ItemCode | No | string(50) | Item code | +| OwnerCode | No | string(50) | Owner code | +| KitItemVersion | No | string(50) | Kit version | +| **Quantity** | **Yes** | long | Ordered quantity | +| **QuantityProc** | **Yes** | long | Processed quantity. For the kits working orders, it will be the assembled quantity (Kitting) or disassembled (Dekitting) | +| **StockConsumed** | **Yes** | Group | Data about the stock consumed. It contains the necessary data to define the stock consumed from the ERP | +| | StockDetails | No | List | Data about the stock details. It contains the necessary data to define the stock details from the ERP | +| | | **ItemCode** | **Yes** | string(50) | Item code | +| | | **OwnerCode** | **Yes** | string(50) | Owner code in case that the type is return | +| | | **Quantity** | **Yes** | decimal | Consumed quantity | +| | | **QtyUoMCode** | **Yes** | string(50) | UoM (Unit of Measure) of the quantity | +| | | **Location** | **Yes** | string(50) | Work location code | +| | | Container | No | string(50) | Container source code (only if it is known) | +| | | StockAttributes | No | StockAttributes | Data about the stock attributes. It contains the necessary data to define the stock attributes from the ERP | +| | | StockCustomAttributes | No | CustomAttributes | Data about the stock custom attributes. It contains the necessary data to define the stock custom attributes from the ERP | +| **StockCreated** | **Yes** | Group | Data about the stock created. It contains the necessary data to define the stock created from the ERP | +| | StockDetails | No | List | Data about the stock details. It contains the necessary data to define the stock details from the ERP | +| | | **ItemCode** | **Yes** | string(50) | Item code | +| | | **OwnerCode** | **Yes** | string(50) | Owner code in case that the type is return | +| | | **Quantity** | **Yes** | decimal | Consumed quantity | +| | | **QtyUoMCode** | **Yes** | string(50) | UoM (Unit of Measure) of the quantity | +| | | **Location** | **Yes** | string(50) | Work location code | +| | | Container | No | string(50) | Container source code (only if it is known) | +| | | StockAttributes | No | StockAttributes | Data about the stock attributes. It contains the necessary data to define the stock attributes from the ERP | +| | | StockCustomAttributes | No | CustomAttributes | Data about the stock custom attributes. It contains the necessary data to define the stock custom attributes from the ERP | +| CustomAttributes | No | CustomAttributes | Data about the custom attributes. It contains the necessary data to define the custom attributes from the ERP | + +### Request and notifications + +#### Imported messages + +Messages that will be received in Import direction (from the ERP to MAP). + +##### Stock status change request - STR + +**Message type**: STR (Stock status change request) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.Contracts.Commands.StockStatusChangeRequestERPCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message type allows to change specific stock status + +- As a response to this request, when stock status is set or removed, a STC (stock status change) message will be sent to notify the change done +- Only _upsert_ or delete operations are permitted (2 (Delete), 3 (Upsert)) +- When _upserting_, the user stock status is always set, even if deleting previous user stock status is required +- When deleting, user status and/or reception status can be deleted + +**Structure**: + +**STR** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Operation** | **Yes** | Enumeration | Operation to perform with the status. UPSERT (3: UPSERT) will be about the user status. The delete (2: Delete) will perform about the user status and/or receipt status.0: Create, 1: Update, 2: Delete, 3: UPSERT | +| **Site** | **Yes** | string(50) | Code of the warehouse site. Has to be an existing site, and It is not allowed to modify it | +| **ItemCode** | **Yes** | string(50) | Item code. Has to be an existing item code, or an error will be notified | +| OwnerCode | No | string(50) | Item owner code. +When not set: +\- If only one owner exists into the system, this +value will be set +\- If there is a default owner, this value will be +set +In any other way, an error is notified | +| FltContainerCode | No | string | Container code that contains the item stock (to filter) | +| FltLocationCode | No | string | Location code that contains the item stock (to filter) | +| FltLogisticAttributes | No | Group | Logistic attributes (to filter) | +| | BestBeforeDate | No | DateTime | Best before date. | +| | Colour | No | string(65) | Colour. | +| | DaysOfLife | No | DateTime | Date when the days of life of the stock will expire. | +| | ExpirationDate | No | DateTime | Expiration date. | +| | ProductionMethod | No | string(65) | Production method. | +| | ProductionDate | No | DateTime | Production date. | +| | PostProductionTreatment | No | string(65) | Post production treatment. | +| | Quality | No | string(65) | Quality. | +| | SerialNumber | No | string(65) | Serial number. | +| | Size | No | string(65) | Size. | +| | Source | No | string(65) | Source. | +| | Version | No | string(65) | Version. | +| | LotCode | No | string(65) | Lot code. | +| FltCustomAttribute | No | Group | Custom attributes (to filter) | +| | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| **StaCode** | **Yes** | string(50) | User status to be set. User or reception status to be deleted. Has to be an existing status code in Easy WMS, or an error will be notified. | +| StaUsrEnd | No | DateTime | User status end in date UTC date-time format. Only used when upserting (3: UPSERT) | +| StaUsrComment | No | string(1000) | User status optional comment. Only used when upserting (3: UPSERT) | + +##### Stock count request - SCR + +**Message type**: SCR (Stock count request) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.Contracts.Commands.StockCountRequestErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message allows to request a stock count with the currently existing data in Easy WMS. Stock to count can be filtered. SCR messages are always responded with WSC01 (same version) messages. - SCR messages only request the counting, so no modifications are done to the stock data. - Specific stock to be counted can be filtered by using the groups _Filter_, _Items_ or _Containers_. - Stock status filters simultaneously by user status and reception status. - One data group at most (_Filter_, _Items_ or _Containers_) can be used to filter in each SCR message in order to avoid redundant stock counting. - It is possible to request a total count with no filter on it. In this case a WSC message with all the site stock will be responded. - When _MassiveCount_ is true, WSC message will group identical stock lines in different locations or LPN. Different status or different logistic attributes will not be grouped. - When _MassiveCount_ is false, WSC will contain a stock line for each stock line in the site. + +**Structure**: + +**SCR** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the warehouse site. | +| **MassiveCount** | **Yes** | bool | When is true the identical stock lines in different locations will be grouped. If it is false the message returns every single stock line. | +| Batch | No | string(50) | Unique code used to group different messages in the same batch. | +| Filter | No | Group | Defines the filter by item categories. If this data group has value not _Items_ nor _Containers_ data groups are allowed. | +| | TypeCode | No | string(50) | Item type which stock will be counted. | +| | FamilyCode | No | string(50) | Item family which stock will be counted. | +| | OwnerCode | No | string(50) | Owner who owns the stock which will be counted. | +| Items | No | List | Defines the filter by an item or a list of items. If this data group has value not _Filter_ nor _Containers_ data groups are allowed. | +| | **ItemCode** | **Yes** | string(50) | Item which stock will be counted. | +| | OwnerCode | No | string(50) | Owner of the specific item to be counted. +When not set, default owner or unique owner is assumed.If there is more than one product and there is not default owner returns quantity zero. | +| | StatusCode | No | string(50) | User or reception status stock to be counted. | +| | Attributes | No | Group | The logistic attributes of the item to filter. | +| | | BestBeforeDate | No | DateTime | Best before date. | +| | | Colour | No | string(65) | Colour. | +| | | DaysOfLife | No | DateTime | Date when the days of life of the stock will expire. | +| | | ExpirationDate | No | DateTime | Expiration date. | +| | | ProductionMethod | No | string(65) | Production method. | +| | | ProductionDate | No | DateTime | Production date. | +| | | PostProductionTreatment | No | string(65) | Post production treatment. | +| | | Quality | No | string(65) | Quality. | +| | | SerialNumber | No | string(65) | Serial number. | +| | | Size | No | string(65) | Size. | +| | | Source | No | string(65) | Source. | +| | | Version | No | string(65) | Version. | +| | | LotCode | No | string(65) | Lot code. | +| Containers | No | List | Defines the filter by a container or a list of containers. If this data group has value not _Filter_ nor _Items_ data groups are allowed. | +| | **ContainerCode** | **Yes** | string(50) | Code of the container to be counted. | + +##### Count order request - COR + +**Message type**: COR (Count Order Request) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.Contracts.Commands.CountOrderErpCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: This message is used to request the creation, update or deletion of a count order and its lines (it can indicate any of the characteristics allowed for a count order in Easy WMS) + +- COR messages are always answered with COF messages with the same count code number. The main difference between the SCR message and the COR message is that the COR message corresponds to the COF message, which merely contains the stock of the counted locations (as indicated in COR). The WSC, as a result of the SCR message, responds to all the stock in the warehouse. + +- It allows to modify the count code, the description and the priorities; as well as any data on its lines (as well as delete them), as long as they have not been released. + +- Once the count has been released, any new lines in the count will be auto-released, unlike orders created directly in Easy WMS. + +- Count lines that are added when the count has already been released will be released automatically. This behavior is exclusive for count lines created through this message. + +- The message contains the _ignoreNull_ parameter that allows specifying the treatment for non-mandatory empty labels. If the parameter is set to _true_ it will ignore all empty fields and it will create the order/line (except for parameters that are of type date). When the parameter is set to _false_, and there are empty non-mandatory fields, it will not create/update anything included in the message and will return an error. + +- The message contains the _transactional_ parameter that defines the behavior on an error in a line. When set to _true_, and there is an error on one line, it will not process any of the lines (even if the rest contain no errors). If the parameter is set to _false_, only errored lines will be ignored, and well-defined lines will be processed. + +- The message contains the _complete_ parameter, which defines the behavior on order updates. If the parameter is set to _true_ it will update the command with everything contained in the message, removing any previously created lines. If the parameter is set to _false_, it will honor what already exists in the command and only update/create/delete what is set in the new message. + + +**Structure**: + +**COR** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| IgnoreNulls | No | bool | Flag to ignore null values. If it is set to true, null values are not modified in the upsert and update operations. | +| **Operation** | **Yes** | Enumeration | Operation to be carried out with the count order.An error may be reported if the operation is not allowed for the order status.Operation D will result in a deletion when the order is being created or a cancellation when it is released. 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| **Code** | **Yes** | string(50) | Código de la orden de recuento | +| NewCode | No | string(50) | New count order code.It will only be used if you want to change(operations U, S) | +| **Site** | **Yes** | string(50) | Code of the system site where the stock is located.An existing site must be included in the system. | +| Data | No | Group | Data about the count order. It contains the necessary data to define a count order from the ERP. | +| | Description | No | string(1000) | Count order’s description | +| | **Priority** | **Yes** | Enumeration | Count order priority. Possible values: Urgent, High, Normal, Low, VeryLow | +| | CustomAttribute | No | Group | Data about the custom attributes.It contains the necessary data to define the custom attributes from the ERP | +| | | Attribute1 | No | string | | +| | | Attribute2 | No | string | | +| | | Attribute3 | No | string | | +| | | Attribute4 | No | string | | +| | | Attribute5 | No | string | | +| | | Attribute6 | No | string | | +| | | Attribute7 | No | string | | +| | | Attribute8 | No | string | | +| | | Attribute9 | No | string | | +| | | Attribute10 | No | string | | +| | | Attribute11 | No | string | | +| | | Attribute12 | No | string | | +| | | Attribute13 | No | string | | +| | | Attribute14 | No | string | | +| | | Attribute15 | No | string | | +| | | Attribute16 | No | string | | +| | | Attribute17 | No | string | | +| | | Attribute18 | No | string | | +| | | Attribute19 | No | string | | +| | | Attribute20 | No | string | | +| | LineList | No | List | Data about the lines of the count order.It contains the necessary data to define the lines of the count order from the ERP | +| | | Operation | No | Enumeration | Operation to be carried out with the line.An error may be reported if the operation is not allowed by the order status. Possible values: 0: Create, 1: Update, 2: Delete, 3: UPSERT | +| | | Item | No | Group | Data about the item. It containers the necessary data to define the item to count from the EPR | +| | | | **ProductCode** | **Yes** | string(50) | Code of the product to be counted.You must reference an existing item code in the system, otherwise the error will be reported. | +| | | | OwnerCode | No | string(50) | Owner’s code of the item to be counted.If no owner is indicated:a) If there is only one owner for the item indicated, it will be taken.b) If there are several owners for the indicated item and one is marked as the default, it will be this one.c) If there is no stock for the indicated owner, a zero quantity will be counted. You must reference an existing owner code in the system, otherwise the error will be reported. | +| | | | ProductCountAttErpData | No | Group | Data about the item line type custom attributes. It contains the necessary data to define the custom attributes of the line from the ERP | +| | | | | LotCode | No | string(65) | Lot logistic attribute.Filter the items with exact match.If it does not exist in the system, the count will be zero for this item. | +| | | | | SerialNumber | No | string(65) | Serial number logistic attribute. Filter the items with exact match. If it does not exist in the system, the count will be zero for this item | +| | | | | Quality | No | string(65) | Quality logistic attribute. Filter the items with exact match. If it does not exist in the system, the count will be zero for this item. | +| | | | | Color | No | string(65) | Color logistic attribute. Filter the items with exact match.If it does not exist in the system, the count will be zero for this item. | +| | | | | Source | No | string(65) | Source logistic attribute. Filter the items with exact match. If it does not exist in the system, the count will be zero for this item | +| | | | | Version | No | string(65) | Version logistic attribute. Filter the items with exact match. If it does not exist in the system, the count will be zero for this item. | +| | | | | ProductionMethod | No | string(65) | Production method logistic attribute. Filter the items with exact match. If it does not exist in the system, the count will be zero for this item. | +| | | | | PostTreatment | No | string(65) | Post-production method logistic attribute. Filter the items with exact match. If it does not exist in the system, the count will be zero for this item. | +| | | | | Size | No | string(65) | Size logistic attribute. Filter the items with exact match. If it does not exist in the system, the count will be zero for this item. | +| | | | | BestBeforeDateMin | No | DateTime | Logistic attribute date of days of life.Filters items with greater or equal days-of-life(and less than MaxAttDaysLife).In UTC time | +| | | | | BestBeforeDateMax | No | DateTime | Logistical attribute: best before date. Filters items with matching dates equal to or previous. Filters items with matching dates equal to or previous than this date (and less than MaxAttBBDate).In UTC time | +| | | | | ExpirationDateMin | No | DateTime | Logistic attribute expiration date. Filters items with date matches equal to or later than this date (and less than MaxAttExpDate). In UTC time | +| | | | | ExpirationDateMax | No | DateTime | Logistic attribute expiration date. Filters items with date matches equal to or previous than this date (and less than MaxAttExpDate). In UTC time | +| | | | | ProductionDateMin | No | DateTime | Manufacturing data logistic attribute. Filter the items with dates equal to or later than this date (and less than MaxAttProdDate). In UTC time | +| | | | | ProductionDateMax | No | DateTime | Manufacturing data logistic attribute. Filter the items with dates equal to or previous than this date (and less than MaxAttProdDate). In UTC time | +| | | | | DaysOfLifeDateMin | No | DateTime | Logistic attribute date of days of life. Filters items with later or equal days-of-life (and less than MaxAttDaysLife).In UTC time | +| | | | | DaysOfLifeDateMax | No | DateTime | Logistic attribute date of days of life. Filters items with previous or equal days-of-life (and less than MaxAttDaysLife). In UTC time | +| | | Container | No | Group | Data about the container. It containers the necessary data to define the container to count from the EPR | +| | | | **ContainerCode** | **Yes** | string(50) | Code of the container to be counted.If the container code refers to a customer container, no line/order must be created to count it and the container value will be returned to the ERP with all the loose stock recorded in it.If the container code does not exist in the system, a count will be returned to zero for that container | +| | | Location | No | Group | Data about the location. It containers the necessary data to define the location to count from the EPR | +| | | | PutawayZoneCode | No | string(50) | Warehouse area. You generate a bin count task for all existing bins within this zone. You must indicate an existing zone of the warehouse, otherwise an error will be indicated. | +| | | | AisleCode | No | string(50) | Warehouse aisle. It will generate a count task for each location that is linked to this aisle.You must indicate an existing aisle of the warehouse, otherwise an error will be indicated. | +| | | | LocationMaxCode | No | string(50) | Final location of range of locations. Generates a count task for each location in the range of locations set between the bin codes set by this parameter and LocationFrom. The value of this cell can be equal to the LocationFrom criterion, indicating that only one location on this line is counted at any one time. You must indicate a valid location code, otherwise an error will be indicated. | +| | | | LocationMinCode | No | string(50) | Initial location of range of locations. Generates a count task for each location in the range of locations set between the location codes set by this parameter and LocationTo. You must indicate a valid location code, otherwise an error will be indicated. | +| | | | XMax | No | long | X maximum. Within the selected zone, corridor or range of locations. This value sets the maximum X coordinate that the location must have in order to generate a count task. It must be greater than the MinimumX value. You must indicate a positive integer. If “MaximumX” and “MinimumX” have values, it must be less than “MaximumX”. | +| | | | XMin | No | long | X minimum.Within the selected zone, corridor or range of locations.This value sets the minimum X coordinate that the location must have to generate a count task.It must be less than the MaximumX value. You must indicate a positive integer. If “MaximumX” and “MinimumX” have values, it must be less than “MaximumX”. | +| | | | YMax | No | long | Y maximum.Within the selected zone, aisle or range of locations.This value sets the maximum Y coordinate that the location must have to generate a count task.It must be higher than the MinimumY value. You must indicate a positive integer. If “MaximumX” and “MinimumX” have values, it must be less than “MaximumX”. | +| | | | YMin | No | long | Y minimum.Within the selected zone, corridor or range of locations.This value sets the minimum Y coordinate that the location must have in order to generate a count task. It must be less than the MaximumY value. You must indicate a positive integer. If “MaximumX” and “MinimumX” have values, it must be less than “MaximumX”. | +| | | **LineNumber** | **Yes** | long | Sets the count line number | +| | | OwnerCodeCountLine | No | string(50) | Owner code item to count | +| | | CustomAttribute | No | Group | Data about the line custom attributes. It contains the necessary data to define the custom attributes of the line from the ERP | +| | | | Attribute1 | No | string(1000) | Attribute 1. Default value is empty string. | +| | | | Attribute2 | No | string(1000) | Attribute 2. Default value is empty string. | +| | | | Attribute3 | No | string(1000) | Attribute 3. Default value is empty string. | +| | | | Attribute4 | No | string(1000) | Attribute 4. Default value is empty string. | +| | | | Attribute5 | No | string(1000) | Attribute 5. Default value is empty string. | +| | | | Attribute6 | No | string(1000) | Attribute 6. Default value is empty string. | +| | | | Attribute7 | No | string(1000) | Attribute 7. Default value is empty string. | +| | | | Attribute8 | No | string(1000) | Attribute 8. Default value is empty string. | +| | | | Attribute9 | No | string(1000) | Attribute 9. Default value is empty string. | +| | | | Attribute10 | No | string(1000) | Attribute 10. Default value is empty string. | +| | | | Attribute11 | No | string(1000) | Attribute 11. Default value is empty string. | +| | | | Attribute12 | No | string(1000) | Attribute 12. Default value is empty string. | +| | | | Attribute13 | No | string(1000) | Attribute 13. Default value is empty string. | +| | | | Attribute14 | No | string(1000) | Attribute 14. Default value is empty string. | +| | | | Attribute15 | No | string(1000) | Attribute 15. Default value is empty string. | +| | | | Attribute16 | No | string(1000) | Attribute 16. Default value is empty string. | +| | | | Attribute17 | No | string(1000) | Attribute 17. Default value is empty string. | +| | | | Attribute18 | No | string(1000) | Attribute 18. Default value is empty string. | +| | | | Attribute19 | No | string(1000) | Attribute 19. Default value is empty string. | +| | | | Attribute20 | No | string(1000) | Attribute 20. Default value is empty string. | +| | | IsInformed | No | bool | Indicates if count is informed (true, 1) or not (false, 0) | +| | **TransactionalLineList** | **Yes** | bool | Indicator of transactionality for the line list. If it is true, the whole list must be treated as an atomic transaction. +If it is false, each element must be individually transactioned. | +| | **CompleteLineList** | **Yes** | bool | Indicator of completeness for the line list. In case it is true, the whole list must be treated as the only lines allowed for the inbound order. +If it is false, more lines appart from those in the list can exist for this inbound order. | + +##### Container Move Confirmation - CMC + +**Message type**: CMC (Container Movement Confirmation) + +**Import / Export**: Import + +**Command name**: Mecalux.ITSW.EasyWMS.Modules.Contracts.Commands.ContainerMovementConfirmationERPCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts + +**Description**: When movements from an outbound point are not managed via Easy WMS, the CMC message is used for the ERP to confirm the movement from outbound conveyor to the next destination.. + +- CMC message allow “1” (delete) and “0” (update) operations . + +- Delete operation doest not requires a destination, and the container Will be removed on Easy WMS. + +- With the update operation the destination is a mandatory field, and Easy WMS will move the container on outbound conveyor to the location indicated in CMC message. If this operation has not destination, Easy WMS will return an error message. + + +**Structure**: + +**CMC** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **ContainerCode** | **Yes** | string(50) | Container code | +| **Operation** | **Yes** | Enumeration | Indicates the operation that will be executed (1: Update: Update, move container, 2: Delete: Delete, delete container) | +| ForceDeletionOfEmptyHolderContainer | No | bool | Indicates that the holder container will be deleted (if empty) when Operation is “Delete” | +| LocationCode | No | string(50) | Location code to move container when Operation is “Update” | +| **WarehouseCode** | **Yes** | string(50) | Warehouse code to move container when Operation is “Update” | + +#### Exported messages + +Messages that will be sent in Export direction (from MAP to the ERP). + +##### Kitting - KST + +**Message type**: KST (Kit stock assembled) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message is used to notify the assembly of stock of kits inEasy WMS so that the ERP can know the new stock created and the components that have been used to mount it. + +**Structure**: + +**KST01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Warehouse stock site | +| WorkOrderCode | No | string(50) | Work order code | +| **KitItemCode** | **Yes** | string(50) | Kit item code | +| **KitOwnerCode** | **Yes** | string(50) | Kit item owner code | +| **KitQuantity** | **Yes** | long | Quantity mounted. Positive number greater than 0 | +| **KitQuantityUomCode** | **Yes** | string(50) | UoM (Unit of Measure) of the quantity | +| KitLocation | No | string(50) | Location code | +| KitContainer | No | string(50) | LPN | +| **KitVersion** | **Yes** | string(65) | Kit version | +| KitAttLot | No | string(128) | Lot logistic attribute | +| KitAttSN | No | string(128) | Serial number logistic attribute | +| KitAttProdDate | No | DateTime | Production date logistic attribute. UTC date-time format | +| KitAttExpDate | No | DateTime | Expiration date logistic attribute. UTC date-time format | +| KitAttBBDate | No | DateTime | Best before date logistic attribute. UTC date-time format | +| KitAttDaysLife | No | DateTime | Shelf life data logistic attribute. UTC date-time format | +| KitAttQuality | No | string(128) | Quality logistic attribute | +| KitAttColor | No | string(128) | Color logistic attribute | +| KitAttSource | No | string(128) | Source logistic attribute | +| KitAttProdMethod | No | string(128) | Production method logistic attribute | +| KitAttPostTreat | No | string(128) | Post-production treatment logistic attribute | +| KitAttSize | No | string(128) | Size logistic attribute | +| **Components** | **Yes** | Group | Data about the components. It contains the necessary data to define the components from the ERP | +| | **Component** | **Yes** | List | Data about the component. It contains the necessary data to define the component from the ERP | +| | | **CompItemCode** | **Yes** | string(50) | Item component code | +| | | **CompOwnerCode** | **Yes** | string(50) | Item component owner | +| | | **CompQtty** | **Yes** | long | Quantity. Positive number greater than 0 | +| | | **CompQttyUomCode** | **Yes** | string(50) | UoM (Units of Measure) of the quantity | +| | | CompLocationCode | No | string(50) | Location code | +| | | CompContainerCode | No | string(50) | LPN | +| | | CompWeight | No | decimal | Weight. Positive number greater than 0 | +| | | CompAttLot | No | string(128) | Lot logistic attribute | +| | | CompAttSN | No | string(128) | Serial number logistic attribute | +| | | CompAttProdDate | No | DateTime | Fabrication date logistic attribute. UTC date-time format | +| | | CompAttExpDate | No | DateTime | Expiration date logistic attribute. UTC date-time format | +| | | CompAttBBDate | No | DateTime | Best before date logistic attribute. UTC date-time format | +| | | CompAttDaysLife | No | DateTime | Shelf life logistic attribute.UTC date-time format | +| | | CompAttQuality | No | string(128) | Quality logistic attribute | +| | | CompAttColor | No | string(128) | Color logistic attribute | +| | | CompAttSource | No | string(128) | Source logistic attribute | +| | | CompAttProdMethod | No | string(128) | Production method logistic attribute | +| | | CompAttPostTreat | No | string(128) | Post-production treatment logistic attribute | +| | | CompAttSize | No | string(128) | Size logistic atributte | +| | | CompAttVersion | No | string(128) | Version logistic attribute | +| | | CompCustomAttributes | No | CompCustomAttributes | Data about the component custom attributes. It contains the necessary data to define the component custom attributes from the ERP | +| KitCustomAttributes | No | KitCustomAttributes | Data about the kit custom attributes. It contains the necessary data to define the kit custom attributes from the ERP | + +##### Dekitting – UNK + +**Message type**: UNK (Kit stock disassembled) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message is used to notify the disassembly of stock of kits inEasy WMS so that the ERP can know the new stock of the components and the current stock of the kit. + +**Structure**: + +**UNK01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Warehouse stock site | +| WorkOrderCode | No | string(50) | Work order code | +| **KitItemCode** | **Yes** | string(50) | Kit item code | +| **KitOwnerCode** | **Yes** | string(50) | Kit item owner code | +| **KitQuantity** | **Yes** | long | Quantity dissasembled. Positive number greater than 0 | +| **KitQuantityUomCode** | **Yes** | string(50) | UoM (Units of Measure) of the quantity | +| KitLocation | No | string(50) | Location code | +| **KitVersion** | **Yes** | string(65) | Kit version | +| KitAttLot | No | string(128) | Lot logistic attribute | +| KitAttSN | No | string(128) | Serial number logistic attribute | +| KitAttProdDate | No | DateTime | Production date logistic attribute. UTC date-time format | +| KitAttExpDate | No | DateTime | Expiration date logistic attribute. UTC date-time format | +| KitAttBBDate | No | DateTime | Best before date logistic attribute. UTC date-time format | +| KitAttDaysLife | No | DateTime | Shelf life data logistic attribute. UTC date-time format | +| KitAttQuality | No | string(128) | Quality logistic attribute | +| KitAttColor | No | string(128) | Color logistic attribute | +| KitAttSource | No | string(128) | Source logistic attribute | +| KitAttProdMethod | No | string(128) | Production method logistic attribute | +| KitAttPostTreat | No | string(128) | Post-production treatment logistic attribute | +| KitAttSize | No | string(128) | Size logistic attribute | +| **Components** | **Yes** | Group | Data about the components. It contains the necessary data to define the components from the ERP | +| | **Component** | **Yes** | List | Data about the component. It contains the necessary data to define the component from the ERP | +| | | **CompItemCode** | **Yes** | string(50) | Item component code | +| | | **CompOwnerCode** | **Yes** | string(50) | Item component owner | +| | | **CompQtty** | **Yes** | long | Quantity. Positive number greater than 0 | +| | | **CompQttyUomCode** | **Yes** | string(50) | UoM (Units of Measure) of the quantity | +| | | CompLocationCode | No | string(50) | Location code | +| | | CompWeight | No | decimal | Weight. Positive number greater than 0 | +| | | CompCustomAttributes | No | CompCustomAttributes | Data about the component custom attributes. It contains the necessary data to define the component custom attributes from the ERP | +| KitCustomAttributes | No | KitCustomAttributes | | + +##### Stock variation - STV + +**Message type**: STV (Stock variation) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: With this message, Easy WMS notifies stock quantity variations due to adjustment - Stock quantity adjustments are actions performed without previous ERP knowledge. When variations in the stock quantity are a result of an ERP notified actions (i.e. shipping or receipts) no STV message is sent, because finish notification messages will be sent when the action is done. - This message notifies stock quantity increases as well as decreases and logistic attributes modifications. + +**Structure**: + +**STV01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Operation** | **Yes** | string | Performed operation: - _C_: stock quantity increase (creation) - _D_: stock quantity decrease (deletion) | +| **Site** | **Yes** | string(50) | Warehouse stock site code. | +| **ItemCode** | **Yes** | string(50) | Item code. | +| **OwnerCode** | **Yes** | string(50) | Item owner code. | +| LocationCode | No | string(50) | Current stock location code. | +| ContainerCode | No | string(50) | Current stock container code. | +| Status | No | Group | Stocks assigned status. | +| | StaUsrCode | No | string(50) | Current user stock status. | +| | StaUsrEnd | No | DateTime | Current user status end date. | +| | StaUsrComment | No | string(1000) | Current user status comment. | +| | StaRecCode | No | string(50) | Current reception status code. | +| | StaRecEnd | No | DateTime | Current reception status end date. | +| FilterAttributes | No | FltAttributes | This data group will be used as a filter to indicate the specific selection of the stock that has changed in the system. The values of the filter will be the previous values of the stock attributes. In case of deletion, this group will also be used for attributes present in the stock line to be deleted, but not required by the logistic profile of the item. | +| FilterCustomAttributes | No | FltCustomAttributes | This data group will only be used as a filter to indicate the specific selection of the stock that has changed in the system. The values of the filter will be the previous values of the customized of the stock attributes. In case of deletion, this group will also be used for attributes present in the stock line to be deleted, but not required by the logistic profile of the item. | +| **QuantityVar** | **Yes** | decimal | Added or diminished quantity. If quantity has not been modified this value will be zero. | +| **UoMCode** | **Yes** | string(50) | Item unit of measure. | +| ReasonCode | No | string(50) | Adjust reason code. | +| ERPReasonCode | No | string(50) | ERP adjust reason code. | +| Comment | No | string(1000) | Open text adjust comment. | +| Attributes | No | Attributes | In this group, the new values of the stock attributes will be specified in case of modification. | +| CustomAttributes | No | CustomAttributes | In this group, the new values of the stock attributes will be specified in case of modification. | + +##### Stock status change- STC + +**Message type**: STC (Stock status change) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message is a response of a previous STR ERP request, or a warehouse stock status change notified by Easy WMS. + +- Every single creation or deletion of stock status will generate a specific STC message notification. + +**Structure**: + +**STC01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the stock warehouse site | +| **ItemCode** | **Yes** | string(50) | Item Code | +| OwnerCode | No | string(50) | Stock owner code | +| **Quantity** | **Yes** | decimal | Stock quantity | +| **UoMCode** | **Yes** | string(50) | UoM (Unit of Measure) of the quantity | +| Filter | No | Filter | Filter to select the specific stock where the status was modified | +| **Status** | **Yes** | Group | Status | +| | **StaUsrEmpty** | **Yes** | bool | When true, no user status set currently. When false, StaUsrCode is the current user status | +| | StaUsrPrevCode | No | string(50) | User status previous to current user status | +| | StaUsrCode | No | string(50) | Current user status | +| | StaUsrEnd | No | DateTime | Current user status end date | +| | StaUsrComment | No | string(1000) | Current user status comment | +| | **StaRecEmpty** | **Yes** | bool | When true, no reception status set currently. When false, StaRecCode is the current reception status | +| | StaRecPrevCode | No | string(65) | Recepction status previous to current reception status | +| | StaRecCode | No | string(65) | Current reception status | +| | StaRecEnd | No | DateTime | Current reception status end date | + +##### Warehouse stock count - WSC + +**Message type**: WSC (Warehouse stock count) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message allows to request a stock count with the currently existing data in Easy WMS. Stock to count can be filtered. SCR messages are always responded with WSC01 messages - The WSC messages always are the response of same version SCR messages. It is not possible to activate different SCR and WSC versions. - The stock is taken into account since its reception has been closed to it is shipped in a shipping order. - The ASN containers will not be counted since the container has been confirmated and the ASO has been sent. - When the WSC responds to a massive count request (SCR with _MassiveCount_ _true_), WSC message will group identical stock lines in different locations or LPN. Different status or different logistic attributes will not be grouped - When the WSC responds to a detailed count request (SCR with _MassiveCount_ _false_), WSC will contain a stock line for each stock line in the site - When the SCR requests the count of various _Items_ or _Containers_, one response for each one will be sent. + +**Structure**: + +**WSC01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the warehouse site. | +| **WSCDate** | **Yes** | DateTime | Count effective date. | +| Batch | No | string(50) | Unique code used to group different messages in the same batch. It is the same code as the _batch_ code in the _SCR_ request. | +| Stocks | No | Group | The counted stock lines (grouped if it is a massive count). | +| | Stock | No | List | | +| | | ItemCode | No | string(50) | Stock item code. | +| | | OwnerCode | No | string(50) | Stock owner code. | +| | | TypeCode | No | string(50) | Stock item type code. | +| | | FamilyCode | No | string(50) | Stock item family code. | +| | | LocationCode | No | string(50) | The location where is the stock (only for not massive count). | +| | | ContainerCode | No | string(50) | The LPN (_License Plate Number_) where is the stock (only for not massive count). | +| | | **Quantity** | **Yes** | decimal | Stock line quantity. In case of massive count contains the sum of the quantities in the grouped lines. | +| | | UoMCode | No | string(50) | The unit of measure of the stock. | +| | | Status | No | Group | Current user stock status. | +| | | | StaUsrCode | No | string(50) | Current user stock status. | +| | | | StaUsrEnd | No | DateTime | Current user status end date. | +| | | | StaUsrComment | No | string(1000) | Current user status comment. | +| | | | StaRecCode | No | string(65) | Current reception status code. | +| | | | StaRecEnd | No | DateTime | Current reception status end date. | +| | | Attributes | No | Attributes | The stock logistic attributes of the stock. | +| | | CustomAttributes | No | CustomAttributes | Custom attributes of the stock. | + +##### Count order finalization - COF + +**Message type**: COF (Count Order Finalization) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message is used as a response to the warehouse count order request (COR). It contains the inventory (stock/containers) existing in the counted locations. + +- COF messages must always be responses to COR requests with the same version number. It is not possible to activate different versions of COR and COF, as it will imply that COF responses will no longer be received, since the same response version cannot be found. + +- Advance notice containers(ASN) will not be considered in the count until they are confirmed (ASO). + +- COF message will also notify you the status of the count order. Which may be finalized (“closed”) and will have their corresponding stock lines, or canceled (“cancelled”) in this case there will be no record of any location. + +- The COF message will also notify the status changes in the order (“closed” and “cancelled”). When the orders are cancelled, the message will only include the header, indicating the data of the order and its status. When the order is closed, the status change will be notified in the header and the body of the message will include the stock. Deleted orders (before being released) will not issue any COF message. + +- When the closing of a count order that has been created by the COR message is forced, for all the count lines that have not been counted, the stock registered in the warehouse will be included in the message, despite not having been counted. + +- For item and container counts, in automatic warehouses, the location of origin of the container in the message structure will be omitted. + + +**Structure**: + +**COF01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the system site where the stock is located. | +| **CountCode** | **Yes** | string(50) | Count order code. | +| **Status** | **Yes** | string | Ending order status. Possible values: Closed, Cancelled | +| **UpdateDate** | **Yes** | DateTime | Date and time in UTC time when the order status change transaction occurred. | +| Lines | No | Group | Data about the lines of the count order. | +| | **Line** | **Yes** | List | Data about the line of the count order. | +| | | **LineNumber** | **Yes** | long | Sets the count line number with which it was indicated in the COR message. | +| | | Container | No | Group | Data about the container set in count order line. | +| | | | **CntCode** | **Yes** | string(50) | Code of the container requested for counting. | +| | | | **CntCodeExists** | **Yes** | bool | Indicates whether or not the code exists in the warehouse. If the container code does not exist in the system, this value will be set to zero | +| | | | LocationCode | No | string(50) | Code of the location of the container at that time. In the case of an automatic warehouse, the location is omitted. This is because containers are usually counted at a workstation | +| | | | Stocks | No | Group | Stock counted in the container | +| | | | | Stock | No | List | Contains the counted stock data | +| | | | | | **ItemCode** | **Yes** | string(50) | Item code. | +| | | | | | OwnerCode | No | string(50) | Stock owner code. | +| | | | | | **Quantity** | **Yes** | decimal | Existing stock quantity. Positive number greater than or equal to zero | +| | | | | | **UoMCode** | **Yes** | string(50) | Unit of Measurement in which the quantity is expressed. | +| | | | | | ContainerCode | No | string(50) | Code of the container that contains the stock. | +| | | | | | UserStatus | No | Group | Stock user status | +| | | | | | | StaUsrCode | No | string(50) | Stock current user status | +| | | | | | | StaUsrEnd | No | DateTime | Stock current user status end date. Date and hour in UTC | +| | | | | | | StaUsrComment | No | string(1000) | Stock current user status comment | +| | | | | | Attributes | No | Attributes | Data about the stock line attributes. | +| | | Locations | No | Group | Data about the locations set in count order line. | +| | | | Location | No | List | Data about the location set in count order line. | +| | | | | LocationCode | No | string(50) | Counted location code. | +| | | | | LocationEmpty | No | bool | Indicates if the counted location is empty. 1 = location with stock and 0 = empty location. | +| | | | | Stocks | No | Group | Contains the counted stock data | +| | | | | | Stock | No | List | Contains the counted stock data | +| | | | | | | **ItemCode** | **Yes** | string(50) | Item code. | +| | | | | | | OwnerCode | No | string(50) | Stock owner code. | +| | | | | | | **Quantity** | **Yes** | decimal | Existing stock quantity. Positive number greater than or equal to zero | +| | | | | | | **UoMCode** | **Yes** | string(50) | Unit of Measurement in which the quantity is expressed. | +| | | | | | | ContainerCode | No | string(50) | Code of the container that contains the stock. | +| | | | | | | UserStatus | No | Group | Stock user status | +| | | | | | | | StaUsrCode | No | string(50) | Stock current user status | +| | | | | | | | StaUsrEnd | No | DateTime | Stock current user status end date. Date and hour in UTC | +| | | | | | | | StaUsrComment | No | string(1000) | Stock current user status comment | +| | | | | | | Attributes | No | Attributes | Data about the stock line attributes. | +| | | LneCustomAttributes | No | LneCustomAttributes | Data about the line custom attributes set in count order line. | +| CustomAttributes | No | CustomAttributes | Data about the count order custom attributes. | + +##### Container output to PS - COS + +**Message type**: COS (Container Shipped) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message is sent to inform of the arrival of a container at the outbound conveyor. + +- When a container finishes an order at an outbound conveyor, the ERP is informed. This message will allow you to manage, through the ERP communications, movements from the output conveyor. +- If the container has a destination after the output point, the message will indicate that destination and, if applicable, the order to which the container is associated. +- If the destination of the container is the output point itself, the destination fields will be sent empty. + +**Structure**: + +**COS01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Warehouse site code | +| **StationCode** | **Yes** | string(50) | Station code | +| **LocationCode** | **Yes** | string(50) | Location code | +| **ContainerCode** | **Yes** | string(50) | Container code | +| ContainerType | No | string(50) | Container type | +| OutboundOrderCode | No | string(50) | Outbound order code | +| OutboundOrderLineNumber | No | long | Outbound order line number | +| RouteCode | No | string(50) | Route code | +| StopNumber | No | long | Stop number when the task has a route | +| StationToCode | No | string(50) | Station destination code | +| LocationToCode | No | string(50) | Location destination code | +| **ShippingDate** | **Yes** | DateTime | Shipping date | +| CustomAttributes | No | CustomAttributes | Data about the custom attributes | + +##### Client container closed in MP - COC + +**Message type**: COC (Container closed) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message is used to notify to ERP when a client container is closed on the preparation table. + +- When a container is closed on a preparation table, the ERP is informed. This message will allow to manage, through the ERP, movements from the preparation table to its destination station. +- The message will inform about the destination of the container, if it has destination, or empty if the container has not destination + +**Structure**: + +**COC01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **Site** | **Yes** | string(50) | Code of the warehouse site | +| **StationCode** | **Yes** | string(50) | Code of the station | +| **LocationCode** | **Yes** | string(50) | Location code | +| **ContainerCode** | **Yes** | string(50) | Code of the container | +| ContainerType | No | string(50) | Container type | +| OutboundOrderCode | No | string(50) | Outbound order code | +| RouteCode | No | string(50) | Route code | +| StopNumber | No | long | Stop number when the task has a route | +| StationToCode | No | string(50) | Station destination code | +| LocationToCode | No | string(50) | Location destination code | +| **CloseDate** | **Yes** | DateTime | Close Date | +| CustomAttributes | No | CustomAttributes | Data about the custom attributes | + +##### Suggested ABC Classification - SAC + +**Message type**: SAC (Suggested ABC Classification) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: The purpose of this message is to notify the ERP about misclassify items in terms of ABC classification and suggest a proper one. - This message is only sent when the ABC Evaluation has been executed and the **_“Notify to ERP”_** button has been selected. - This message informs all the values with which the **_“ABC Evaluation”_** was executed and all of the items that, under these tested values, are considered to be misclassified (as well as their suggested ABC classification value). + +**Structure**: + +**SAC01** + +| Field | Required | Format | Description | +| --- | --- | --- | --- | +| **CurrentDate** | **Yes** | DateTime | Date in UTC time when the message was generated. | +| **DefinedVariables** | **Yes** | Group | Variable values with which the ABC Evaluation was executed. | +| | LastDays | No | long | Indicates the number of reatroactive days from the _LastCalculationDate_ that are used for extract the data to analyze. | +| | InitialDate | No | DateTime | The initial date of the time interval where the evaluation data has been recovered (date-time in UTC) | +| | FinalDate | No | DateTime | The final date of the time interval where the evaluation data has been recovered (date-time in UTC) | +| | **AnalysisType** | **Yes** | string(50) | This value indicates the behavior with which items had been classified: _Inclusive_ if an item has any participation in a higher ABC classification, regardless if most of its value belongs to a lower classification, it will be assigned to the higher classification. _Exclusive_ if the item is assigned the lowest classification in which its value participates. | +| | **PickingMovements** | **Yes** | bool | Indicates if picking tasks have been included in the ABC evaluation. | +| | **PutawayMovements** | **Yes** | bool | Indicates if putaway tasks have been included in the ABC evaluation. | +| | **ReplenishmentMovements** | **Yes** | bool | Indicates if replenishment tasks have been included in the ABC evaluation. | +| | **ShippingMovements** | **Yes** | bool | Indicates if shipping tasks have been included in the ABC evaluation. | +| | **LastCalculationDate** | **Yes** | DateTime | Indicates the date when the evaluation was executed (date-time in UTC). | +| **Lines** | **Yes** | Group | This group holds only the items with a different values in categories _AnalysisABC_ and _SuggestedABCClassification_. | +| | **Line** | **Yes** | List | | +| | | **ItemCode** | **Yes** | string(50) | Evaluated item code. | +| | | **Owner** | **Yes** | string(50) | Owner of the evaluted item. | +| | | **AnalysisABC** | **Yes** | string(50) | Registered ABC classification. | +| | | **SuggestedABCClassification** | **Yes** | string(50) | Suggested ABC classification after the analysis. | + +### Errors + +#### Exported messages + +Messages that will be sent in Export direction (from MAP to the ERP). + +##### Error message - ERR + +**Type of message**: ERR (Error) + +**Import / Export**: Export + +**Version**: 01 + +**Description**: This message is used to notifies about the errors happened during ERP batch or XML messages import: + +- Some errors that could happen are: + - Non existing reference + - Mandatory data field not set + - Validating error + - Data lock error + - Import service error + - Unknown error +- Depending on the _transactional_ mode of the element that produces the error, the ERR message could contain only one, or several errors into the _NestedErrors_ group: + - When _transactional_ attribute is true, only one error could happen in one element, because if this error happens, the processing of the message will be stopped and reverted + - When _transactional_ attribute is false, multiple errors could happen in one element, and the ERR message would contain every error description during processing +- The _ErrException_ element contains not only the description of the error exception, but also identifies the specific element in the message group that has produced the error by its primary key data + +**Structure**: + +**ERR01** \ No newline at end of file diff --git a/docs/docs_downloads/communications/index.md b/docs/docs_downloads/communications/index.md new file mode 100644 index 0000000..3130b55 --- /dev/null +++ b/docs/docs_downloads/communications/index.md @@ -0,0 +1,52 @@ +## Communications Easy WMS & ERP's + +The automation of communications between Easy WMS and the ERP of the customer, or between Easy WMS and the different ERPs in the case of Logistic operators are one of the most efficient ways to minimize unnecessary work. + +Easy WMS incorporates a transport or connectivity tool called GNA and a powerful ETL (Extract Transform Load) system to establish communication between Easy WMS and the ERP. + +![Diagram with the communications concepts](communications/graphics/gna.jpg) + +The **standard modules** consist in closed sets of communications that work fully when you leave the box. + +The **communication toolkits** include tools and libraries that help to map communications, but require a customized work for each client to work in production + +Using some of this communication modules or toolkits you can integrate satisfactorily Easy WMS and the main ERP systems. + +| ERP | Implementations | +| --- | --- | +| SAP | 85 | +| Microsoft Navision | 13 | +| JDEdwards | 8 | +| SAGE Murano | 6 | +| BaaN | 4 | +| SAP Business ONE | 3 | +| Microsoft Axapta | 3 | +| SAGE 100 | 3 | +| SAGE X3 | 3 | +| Oracle Business Suite | 2 | + +### Standard communication modules + +| Module | Description | +| --- | --- | +| [XML and data base](communications/xmlDB.md) | Easy WMS Communicaction via XML files or data base. | +| [Web-API](communications/web_api.md) | Easy WMS and Web-API communications. | +| [SAP](communications/sap.md) | Easy WMS and SAP communication. | +| [SAGE 200c](communications/sage200c.md) | Easy WMS and SAGE 200c communication. | +| [SAGE X3](communications/sagex3.md) | Easy WMS and SAGE X3 communication. | +| [SAGE 100c](communications/sage100c.md) | Easy WMS and SAGE 100c communication. | +| [Business Central](communications/business_central.md) | Easy WMS and Business Central communication. | +| [Import templates](communications/import_templates.md) | Import Excel templates from SmartUI | + +### Communication toolkits + +| Toolkit | Description | +| --- | --- | +| [SAP Bussiness ONE](communications/one.md) | SAP Bussines ONE communication toolkit. | +| [EDI](communications/edi.md) | EDI communication toolkit | + +## Documentation + +| Name | Description | +| --- | --- | +| [ERP\_MAP\_ETL\_Framework\_EN.pdf](docs/ERP_MAP_ETL_Framework_EN.pdf) | MAP communications architecture introduction and the basics of the ETL framework - English. | diff --git a/docs/docs_downloads/communications/web_api.md b/docs/docs_downloads/communications/web_api.md new file mode 100644 index 0000000..9a91a8c --- /dev/null +++ b/docs/docs_downloads/communications/web_api.md @@ -0,0 +1,57 @@ +![easyWMS](https://msscc.mecalux.com/documentation/documentation/master/EN/graphics/mod_labels/easywms.png) + +## Standard communications module for Web-API + +This document describes the communication interface between EasyWMS and the ERP system. + +Communication between these two systems is bidirectional, so two interfaces are defined, import: from the ERP to EasyWMS and export: from EasyWMS to the ERP. + +The document [Easy WMS Web API Standard Message Types](communications/EasyWMS_WebApi_en.html.md) details the structure of each Easy WMS standard messages. + +## Documentation + +| Name | Description | +| --- | --- | +| [EasyWMS\_WebApi\_es\_Online](communications/EasyWMS_WebApi_es.html.md) | Easy WMS and Web-API communications interface - Online version - Spanish | +| [EasyWMS\_WebApi\_en\_Online](communications/EasyWMS_WebApi_en.html.md) | Easy WMS and Web-API communications interface - Online version - English | +| [EasyWMS\_WebApi\_es.pdf](communications/docs/EasyWMS_WebApi_es.pdf) | Easy WMS and Web-API communications interface - PDF - Spanish | +| [EasyWMS\_WebApi\_en.pdf](communications/docs/EasyWMS_WebApi_en.pdf) | Easy WMS and Web-API communications interface - PDF - English | +| [EasyWMS\_WebApi\_es.docx](communications/docs/EasyWMS_WebApi_es.docx) | Easy WMS and Web-API communications interface - DOCX - Spanish | +| [EasyWMS\_WebApi\_en.docs](communications/docs/EasyWMS_WebApi_en.docx) | Easy WMS and Web-API communications interface - DOCX - English | +| [ETL\_JSONGenerator\_manual\_en.pdf](communications/docs/ETL_JSONGenerator_manual_en.pdf) | JSON and schema sample generator User Manual - English - Pdf version | +| [StoreFulfillment\_WebApi\_es.pdf](communications/docs/StoreFulfillment_WebApi_es.pdf) | Store Fulfillment communications interface - Spanish | +| [StoreFulfillment\_WebApi\_en.pdf](communications/docs/StoreFulfillment_WebApi_en.pdf) | Store Fulfillment communications interface - English | +| [StoreFulfillment\_WebApi\_es.zip](communications/docs/StoreFulfillment_WebApi_es.zip) | Store Fulfillment communications interface - Spanish - Md version | +| [StoreFulfillment\_WebApi\_en.zip](communications/docs/StoreFulfillment_WebApi_en.zip) | Store Fulfillment communications interface - English - Md version | +| [MultiCarrierShipping\_WebApi\_es.pdf](communications/docs/MultiCarrierShipping_WebApi_es.pdf) | MultiCarrier Shipping communications interface - Spanish | +| [MultiCarrierShipping\_WebApi\_en.pdf](communications/docs/MultiCarrierShipping_WebApi_en.pdf) | MultiCarrier Shipping communications interface - English | +| [MultiCarrierShipping\_WebApi\_es.zip](communications/docs/MultiCarrierShipping_WebApi_es.zip) | MultiCarrier Shipping communications interface - Spanish - Md version | +| [MultiCarrierShipping\_WebApi\_en.zip](communications/docs/MultiCarrierShipping_WebApi_en.zip) | MultiCarrier Shipping communications interface - English - Md version | +| [Manufacturing\_WebApi\_es\_Online](communications/docs/Manufacturing_WebApi_es.html.md) | Manufacturing and Web-API communications interface - Online version - Spanish | +| [Manufacturing\_WebApi\_en\_Online](communications/docs/Manufacturing_WebApi_en.html.md) | Manufacturing and Web-API communications interface - Online version - English | +| [Manufacturing\_WebApi\_es.pdf](communications/docs/Manufacturing_WebApi_es.pdf) | Manufacturing and Web-API communications interface - PDF - Spanish | +| [Manufacturing\_WebApi\_en.pdf](communications/docs/Manufacturing_WebApi_en.pdf) | Manufacturing and Web-API communications interface - PDF - English | +| [Manufacturing\_WebApi\_es.docx](communications/docs/Manufacturing_WebApi_es.docx) | Manufacturing and Web-API communications interface - DOCX - Spanish | +| [Manufacturing\_WebApi\_en.docx](communications/docs/Manufacturing_WebApi_en.docx) | Manufacturing and Web-API communications interface - DOCX - English | +| [Billing\_WebApi\_es.pdf](communications/docs/Billing_WebApi_es.pdf) | Billing communications interface - Spanish - Pdf version | +| [Billing\_WebApi\_en.pdf](communications/docs/Billing_WebApi_en.pdf) | Billing communications interface - English - Pdf version | +| [Billing\_WebApi\_es.zip](communications/docs/Billing_WebApi_es.zip) | Billing communications interface - Spanish - Md version | +| [Billing\_WebApi\_en.zip](communications/docs/Billing_WebApi_en.zip) | Billing communications interface - English - Md version | +| [Owner Extensions\_WebApi\_es.pdf](communications/docs/OwnerExtensions_WebApi_es.pdf) | Owner Extensions communications interface - Spanish - Pdf version | +| [Owner Extensions\_WebApi\_en.pdf](communications/docs/OwnerExtensions_WebApi_en.pdf) | Owner Extensions communications interface - English - Pdf version | +| [Owner Extensions\_WebApi\_es.zip](communications/docs/OwnerExtensions_WebApi_es.zip) | Owner Extensions communications interface - Spanish - Md version | +| [Owner Extensions\_WebApi\_en.zip](communications/docs/OwnerExtensions_WebApi_en.zip) | Owner Extensions communications interface - English - Md version | +| [Value Added Service\_WebApi\_es.pdf](communications/docs/ValueAddedService_WebApi_es.pdf) | Value Added Service communications interface - Spanish - Pdf version | +| [Value Added Service\_WebApi\_en.pdf](communications/docs/ValueAddedService_WebApi_en.pdf) | Value Added Service communications interface - English - Pdf version | +| [Value Added Service\_WebApi\_es.docx](communications/docs/ValueAddedService_WebApi_es.docx) | Value Added Service communications interface - Spanish - Docx version | +| [Value Added Service\_WebApi\_en.docx](communications/docs/ValueAddedService_WebApi_en.docx) | Value Added Service communications interface - English - Docx version | +| [Value Added Service\_WebApi\_es.zip](communications/docs/ValueAddedService_WebApi_es.zip) | Value Added Service communications interface - Spanish - Md version | +| [Value Added Service\_WebApi\_en.zip](communications/docs/ValueAddedService_WebApi_en.zip) | Value Added Service communications interface - English - Md version | + +## Downloads + +| Name | Description | Version | Date | +| --- | --- | --- | --- | +| [ETL\_JSONGenerator.zip](communications/downloads/ETL_JSONGenerator.zip) | This package contains JSON and Schemes Examples Generator. | 11.10.25058.1 | 03/11/2025 | + +If you have any suggestion or comment on this documentation, please submit it to [documentation@mecalux.com](mailto:documentation@mecalux.com) \ No newline at end of file diff --git a/docs/docs_downloads/index.md b/docs/docs_downloads/index.md new file mode 100644 index 0000000..d8dba51 --- /dev/null +++ b/docs/docs_downloads/index.md @@ -0,0 +1,27 @@ +## Documents and downloads + +MAP (Mecalux Application Paltform) : /map +Communications externes and ERP : /communications + +| Tools | Applications | Services | +| --- | --- | --- | +| [](tools/easyb.md "EasyBuilder")EasyBuilder | [](apps/easywms.md "Easy WMS")Easy WMS | [](services/gna.md "GNA")GNA | +| [](tools/easys.md "EasyS")EasyS | [](apps/scem.md "Supply Chain Event Management")Supply Chain Event Management | [](services/printer.md "Printer Service")Label printer | +| [](tools/assistant.md "Easy Assistant")Easy Assistant | [](apps/ecommerce.md "eCommerce")eCommerce | [](services/ptl.md "PTL")PTL | +| [](tools/easym.md "EasyM")EasyM | [](apps/mcs.md "Multi Carrier Shipping Software")Multi Carrier Shipping Software | [](services/voice.md "Voice picking")Voice picking | +| [](tools/ugna.md "uGNA")uGNA | [](apps/manufacturing.md "WMS for Manufacturing")WMS for Manufacturing | [](services/sync.md "Database Sync")Database Sync | +| | [](apps/ps.md "Pallet Shuttle")Pallet Shuttle | [](services/gateway.md "Easy WMS Gateway")Easy WMS Gateway | +| | [](apps/lms.md "Labor Management System")Labor Management System | | +| | [](apps/vas.md "Value Added Services (VAS)")Value Added Services (VAS) | | +| | [](apps/faults.md "Automation Dashboard")Automation Dashboard | | +| | [](apps/sf.md "Store Fulfillment")Store Fulfillment | | +| | [](apps/slotting.md "Slotting for WMS")Slotting for WMS | | +| | [](apps/ym.md "Yard Management")Yard Management | | +| | [](apps/billing.md "3PL Billing")3PL Billing | | +| | [](apps/tplportal.md "3PL Client Portal")3PL Client Portal | | +| | [](apps/directives.md "Directives")Client-Specific Rules | | +| | [](apps/movirack.md "Movirack")Movirack | | +| | [](apps/wwd.md "Web Configurator")Web Configurator | | +| | [](apps/agv.md "AGVs")AGVs | | +| | [](apps/eds.md "External devices")External devices | | +| | [](apps/cobot.md "Cobot")Cobot | | diff --git a/docs/entities/easywms_reading_entites.md b/docs/entities/easywms_reading_entites.md new file mode 100644 index 0000000..ebba898 --- /dev/null +++ b/docs/entities/easywms_reading_entites.md @@ -0,0 +1,17 @@ +[Account](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Account.md) Reading model for an account [AccountType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AccountType.md) Reading model for a account type [AccountTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AccountTypeRelationsBuilder.md) Generate the relations where AccountType is the dependent table. [Agency](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Agency.md) Represents the agency data showed to the UI [AgencyRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AgencyRelationsBuilder.md) Generate the relations where Agency is the dependent table. [AggregateAttachment](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AggregateAttachment.md) Represents the aggregate attachment showed to the UI [AggregateNote](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AggregateNote.md) Represents the aggregate note showed to the UI [Aisle](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aisle.md) Defines the physical characteristics of aisle. Aisle in a warehouse is a corridor used for the movement of people and equipament, facilitiating access and the handling of goods. [AisleType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AisleType.md) Defines the characteristics of the aisle type. [Alias](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Alias.md) Alias entity reading [AlternativeProduct](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AlternativeProduct.md) Alternative product entity reading [Aps3DAutomaticLock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DAutomaticLock.md) Defines the characteristics of the Aps3D automatic lock [Aps3DChannelInUseBehaviour](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DChannelInUseBehaviour.md) Defines the characteristics of the Aps3D behaviour when the cannel is in use [Aps3DChargeCriterion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DChargeCriterion.md) Defines the characteristics of the Aps3D Charge Criterion [Aps3DChargeCriterionProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DChargeCriterionProfile.md) Represents the relationship between an Aps 3D charge profile and Aps 3D charge criterion [Aps3DChargeProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DChargeProfile.md) Defines the characteristics of the Aps3D Charge Profile [Aps3DChargeTime](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DChargeTime.md) Defines the characteristics of the Aps3D Charge time [Aps3DChargeTimeProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DChargeTimeProfile.md) Represents the relationship between an Aps 3D charge profile and Aps 3D charge time [Aps3DConfiguration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DConfiguration.md) Defines the characteristics of the Aps3D Configuration [AssignedCobotTool](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AssignedCobotTool.md) Reading entity for assigned cobot tool [BarcodeFC](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeFC.md) Contains information about the first character of the barcode [BarcodeFCRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeFCRelationsBuilder.md) Generate the relations where barcode FC is the dependent table. [BarcodeIA](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeIA.md) Contains information about barcode IA. [BarcodeIALabel](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeIALabel.md) Contains information about barcode IA label. [BarcodeIARelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeIARelationsBuilder.md) Generate the relations where barcode IA is the dependent table. [BarcodeLabel](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeLabel.md) Contains information about the barcode label. [BarcodeLabelRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeLabelRelationsBuilder.md) Generate the relations where barcode label is the dependent table. [BarcodeLabelType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeLabelType.md) Contains information about barcode label type. [Cart](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Cart.md) Represents a cart [ChildLot](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ChildLot.md) Child lot. [ClassificationZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ClassificationZone.md) Contains information about the reception line. [ClientStock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ClientStock.md) **Obsolete** +Represents the Client stock and containers. [CobotMode](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CobotMode.md) Reading entity for cobot mode [CobotTool](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CobotTool.md) Reading entity for cobot tool [Company](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Company.md) Reading model for a company [CompanyRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CompanyRelationsBuilder.md) Generate the relations where Company is the dependent table. [CompanyView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CompanyView.md) Location entity for SQL View [Computer](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Computer.md) Computer for reading model [ConfigEntity](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ConfigEntity.md) ConfigEntity for reading model [ConfigurationAttachment](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ConfigurationAttachment.md) Contains information about the configuration attachment. [ConsolidationFeature](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ConsolidationFeature.md) Contains information about consolidation feature. [ConsolidationFeatureStation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ConsolidationFeatureStation.md) Contains information between the relationship of a consolidation feature and a station [ConsolidationOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ConsolidationOrder.md) Contains information about consolidation order. [ConsolidationOrderLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ConsolidationOrderLine.md) Contains information about consolidation order line. [Container](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Container.md) Contains information about a container. A container is a box or a pallet identified by a code and usually labelled. [ContainerAsnEquivalentGroup](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerAsnEquivalentGroup.md) Defines the physical characteristics of the container asn equivalent group [ContainerLock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerLock.md) Contains information about the container Lock [ContainerLockType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerLockType.md) Contains information about the type of container lock. [ContainerSearchLocationTrace](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerSearchLocationTrace.md) Contains information about container search location trace [ContainerType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerType.md) Defines the physical characteristics of the container type [ContainerTypePLC](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerTypePLC.md) Contains information about container type PLC. [ContainerTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerTypeRelationsBuilder.md) Generate the relations where ContainerType is the dependent table. [ContainerTypeStackableBy](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerTypeStackableBy.md) Contains information on the relationships of the container types that can hold a containerType. [CountLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CountLocation.md) Represents a count location. [CountOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CountOrder.md) Represents a count order. [CountOrderLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CountOrderLine.md) Represents a count order line. [CountProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CountProfile.md) Count profile reading model. [CraneTypeContType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CraneTypeContType.md) Defines the physical characteristics of the crane type container types. [CuttingProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CuttingProfile.md) Location profile reading model. [CuttingProfileStation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CuttingProfileStation.md) Contains information about the cutting profile station. [CycleCountIteration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CycleCountIteration.md) Represents a cycle count iteration. [CycleCountIterationView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CycleCountIterationView.md) SQL view to represent the calculated properties of a cycle count iteration [CycleCountSchedule](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CycleCountSchedule.md) Represents a cycle count schedule. [Division](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Division.md) Defines the characteristics of a stock holder division [DivisionType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/DivisionType.md) Defines the physical characteristics of a division type. [DivisionTypeElement](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/DivisionTypeElement.md) Defines the physical characteristics of a division type element. [DivisionTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/DivisionTypeRelationsBuilder.md) Generate the relations where DivisionType is the dependent table. [ExclusiveSecurement](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ExclusiveSecurement.md) Represents an exclusive securement for a container or stock [ExclusiveSecurementView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ExclusiveSecurementView.md) **Obsolete** +Represents an exclusive securement for a container or stock [GalileoEnd](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/GalileoEnd.md) Contains information about a galileo end. [GalileoEvent](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/GalileoEvent.md) Contains information about a galileo event. [Hazard](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Hazard.md) Contains information about the hazard. [HazardClass](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/HazardClass.md) Hazard class for reading model. [HazardClassRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/HazardClassRelationsBuilder.md) Generate the relations where HazardClass is the dependent table. [HazardRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/HazardRelationsBuilder.md) Generate the relations where Hazard is the dependent table. [HeightTypePLC](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/HeightTypePLC.md) Contains information about a height type PLC. [Image](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Image.md) Reading model for an image [InboundClass](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/InboundClass.md) Inbound class. Used to allow the receipt process to be customized. [InboundLinesForOutboundOrderView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/InboundLinesForOutboundOrderView.md) Represents inbound lines for outbound order view [InboundOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/InboundOrder.md) Represents the notice of a number of items expected to be received in the warehouse. It is usually related to a sale order but it can also be related to a return, a transfer from another warehouse, a production line created goods, etc. [InboundOrderLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/InboundOrderLine.md) [InboundSecurement](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/InboundSecurement.md) Represents the securement of the stock to be received in the warehouse for an shipping order or an account [Kit](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Kit.md) Represents an item made up by other items that act as its components. [KitComponent](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/KitComponent.md) Represents each component necessary to assembly a kit. [KitComponentStock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/KitComponentStock.md) Represents the stock consumed to assemble a kit. [KitStock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/KitStock.md) Contains information about the KitStock. Represents the stock which is consumed or is created in a KitAssembly or KitDissasembly process. It is used mainly in ERP communications. [LiftConfig](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LiftConfig.md) Contains information about the lift configuration. [LiftTypeContType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LiftTypeContType.md) Contains information between the relationship of lift type and container type. [Load](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Load.md) Represents a truck load. [LoadConfiguration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LoadConfiguration.md) Represents a load configuration. [LoadedContainer](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LoadedContainer.md) **Obsolete** +Contains information about a container loaded in load truck. [LoadedStock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LoadedStock.md) **Obsolete** +Represents a container loaded stock in load truck. [LoadForView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LoadForView.md) SQL view to represent the calculated properties of a truck load. [Location](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Location.md) Defines the characteristics of a location - It is used for the management of stock, containers, areas within the warehouse,... can be physical or virtual locations [LocationContainerType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LocationContainerType.md) Location container type allowed reading model. Represents the container type allowed in the given location. [LocationLockType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LocationLockType.md) Defines the characteristics of a location lock type. [LocationRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LocationRelationsBuilder.md) Generate the relations where Location is the dependent table. [LocationStack](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LocationStack.md) Defines the stack of a location. A location can be formed by several stacks (i.e. clasimat locations). [LocationView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LocationView.md) Location entity for SQL View. [LogisticAttribute](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticAttribute.md) Represents a logistic attribute. [LogisticAttributeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticAttributeRelationsBuilder.md) Generate the relations where LogisticAttribute is the dependent table [LogisticBehaviour](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticBehaviour.md) Represents a logistic behaviour [LogisticCapture](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticCapture.md) Represents a logistic attribute capture option. [LogisticProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticProfile.md) Logistic profile for reading model. [LogisticProfileCapture](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticProfileCapture.md) Represents a profile logistic capture option. [LogisticProfileRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticProfileRelationsBuilder.md) Generate the relations where LogisticProfile is the dependent table [LogisticRestrictedValue](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticRestrictedValue.md) Represents a logistic restricted value. [ManualEquipment](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ManualEquipment.md) Manual Equipment entity for reading model [ManualEquipmentType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ManualEquipmentType.md) Manual equipment type reading model. [ManualEquipmentTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ManualEquipmentTypeRelationsBuilder.md) Generate the relations where manual equipment type is the dependent table. [ManualEquipmentTypeRestriction](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ManualEquipmentTypeRestriction.md) Manual equipment type restriction for reading model Contains information about a manual equipment type restriction by aisle or working zone. The restriction is for a manual aisle or a working zone, but not both at same time. The restriction is for define the maximum number of equipments that can work at the same zone or for define the restriction between two different equipment types but not both at same time. [ManualEquipmentView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ManualEquipmentView.md) Manual Equipment entity for SQL View [MasterDataEntityRelationsModel](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/MasterDataEntityRelationsModel.md) Manages the relations between entities. [MasterLot](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/MasterLot.md) Master lot. [MaterialABC](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/MaterialABC.md) Defines the characteristics of the material ABC. [MaterialABCEvaluation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/MaterialABCEvaluation.md) Contains information about the ABC Evaluation. [MaterialABCEvaluationConfiguration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/MaterialABCEvaluationConfiguration.md) Contains information about the ABC Configuration. [MaterialABCRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/MaterialABCRelationsBuilder.md) Generate the relations where MaterialABC is the dependent table. [Movement](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Movement.md) Defines the characteristics of a movement. [OrderAssign](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OrderAssign.md) Represents an order assign. [Organization](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Organization.md) Contains information about organization [OrganizationRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OrganizationRelationsBuilder.md) Generate the relations where WritingOrganization is the dependent table [OutboundClass](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundClass.md) Represents an outbound class. [OutboundIssue](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundIssue.md) Represent a Outbound issue [OutboundIssueView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundIssueView.md) **Obsolete** +Represent a Outbound issue view [OutboundIssueViewV2](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundIssueViewV2.md) Represent a Outbound issue view [OutboundLineIssueView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundLineIssueView.md) Represent a Outbound issue line view [OutboundLineView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundLineView.md) SQL view to represent the calculated properties of an outbound line - Represents the details of one outbound order line [OutboundOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrder.md) Represents an outbound order - Is used for managing and tracking outbound orders. It includes key details. [OutboundOrderCancelConfiguration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderCancelConfiguration.md) Represents the configuration of the outbound order cancelation [OutboundOrderGroup](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderGroup.md) **Obsolete** +Represents a outbound order group. [OutboundOrderLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderLine.md) Represents an outbound line.- Is used for managing and tracking outbound orders lines. It includes key details. [OutboundOrderLineDetails](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderLineDetails.md) Represents an outbound order line details. [OutboundOrderLineGroup](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderLineGroup.md) **Obsolete** +Represents a outbound order line group. [OutboundOrderLoad](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderLoad.md) Represents the relationship between an outbound order and its truck loads [OutboundOrderStock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderStock.md) **Obsolete** +Represents the relationship between outbound order and its stocks [OutboundOrderUAPBoxLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderUAPBoxLocation.md) OutboundOrderUAPBoxLocation properties [OutboundOrderView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderView.md) **Obsolete** +Outbound order for view. [OutboundOrderViewV2](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderViewV2.md) SQL view to represent the calculated properties of an outbound order. [Owner](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Owner.md) Represents an owner [OwnerExclusion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OwnerExclusion.md) Reading Entity for OwnerExclusion [OwnerRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OwnerRelationsBuilder.md) Generate the relations where Owner is the dependent table [PackageReading](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PackageReading.md) Defines the characteristics of a package. [Parameter](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Parameter.md) Represents a parameter. [ParameterAllowedValue](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ParameterAllowedValue.md) Represents an allow value of a parameter [ParameterRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ParameterRelationsBuilder.md) Generate the relations where Parameter is the dependent table. [ParamValue](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ParamValue.md) Represents a param value. [PartitionLabel](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PartitionLabel.md) Represent a partition label [PartitionLabelView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PartitionLabelView.md) Represent a partition label [Permission](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Permission.md) Contains information about the permission. [PickingZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PickingZone.md) Represents the picking zone showed to the UI [PkMpConfig](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PkMpConfig.md) Defines the characteristics of the relation between a PK station and its MP station. [PkMpConfigView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PkMpConfigView.md) PKMPConfig entity for SQL View. [PrepackagingLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PrepackagingLine.md) Represents a PrepackagingLine. [PrintConfiguration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PrintConfiguration.md) Print configuration entity [Printer](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Printer.md) Printer for reading model [PriorityProductLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PriorityProductLocation.md) Represents a priority product location [Product](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Product.md) Product entity reading [ProductClassExclusion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductClassExclusion.md) Class for product class exclusions. [ProductConversion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductConversion.md) Contains information about a conversion for a product [ProductConversionContainerType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductConversionContainerType.md) Contains information about the relationship between a container type and a product conversion (eg. the maximum amount) [ProductConversionView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductConversionView.md) ProductConversion for view. [ProductFamily](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductFamily.md) Product family reading model. [ProductFamilyExclusion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductFamilyExclusion.md) Class for product family exclusions. [ProductFamilyRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductFamilyRelationsBuilder.md) Generate the relations where ProductFamily is the dependent table. [ProductLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductLocation.md) Represents a product location. [ProductLocationPartitionLabel](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductLocationPartitionLabel.md) Represents a product location partition label. [ProductLocationView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductLocationView.md) Represents a product location. [ProductPack](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductPack.md) Information about the productPack [ProductTranslation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductTranslation.md) The product translation [ProductTranslationView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductTranslationView.md) The product translation view [ProductType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductType.md) Product type reading model. [ProductTypeExclusion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductTypeExclusion.md) Product type exclusion reading model. [ProductTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductTypeRelationsBuilder.md) Generate the relations where ProductType is the dependent table. [ProductView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductView.md) **Obsolete** +Product for view. [ProductViewV2](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductViewV2.md) Product for view. [PsGroup](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PsGroup.md) Reading Entity for PsGroup [PsGroupDetail](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PsGroupDetail.md) Reading Entity for PsGroupDetail [PsGroupOrderAssign](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PsGroupOrderAssign.md) Reading Entity for PSGroupOrderAssign [PtlController](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlController.md) Represents a ptl controller. [PtlDevice](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlDevice.md) Represents a ptl device. [PtlDeviceType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlDeviceType.md) Represents a PTL device type. [PtlLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlLocation.md) Represents a location of a PTL device. [PtlOrderAssignment](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlOrderAssignment.md) Represents a PTL order assignment to an equipment. [PtlService](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlService.md) Represents a PTL service. [PtlZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlZone.md) Represents a PTL zone. [PutawayProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PutawayProfile.md) Defines the characteristics of a putaway profile. [PutawayProfileRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PutawayProfileRelationsBuilder.md) Generate the relations where PutawayProfile is the dependent table. [PutawayZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PutawayZone.md) Defines the characteristics of a putaway zone. [RackType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/RackType.md) Represents the rackType data showed to the UI [RackTypeContainerType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/RackTypeContainerType.md) Constains the relations rackType-containerType [RackTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/RackTypeRelationsBuilder.md) Generate the relations where RackType is the dependent table. [Reason](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Reason.md) Reason [ReasonProcessType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReasonProcessType.md) ProcessTypeReason [Reception](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Reception.md) Contains information about the receipt. Notice of a number of items expected to be received in the warehouse. [ReceptionInboundOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionInboundOrder.md) Contains information about the relationship between receptions and inbound orders. [ReceptionLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionLine.md) Represents the reception line. [ReceptionManualEquipment](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionManualEquipment.md) **Obsolete** +Contains information about the relationship between receptions and manual equipments. (NOT IMPLEMENTED). [ReceptionProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionProfile.md) Reception profile reading model. [ReceptionProfileDefaultStatus](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionProfileDefaultStatus.md) Reception profile default status reading model. [ReceptionProfileRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionProfileRelationsBuilder.md) Generate the relations where ReceptionProfile is the dependent table. [ReceptionUser](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionUser.md) **Obsolete** +Contains information about the relationship between receptions and users. (NOT IMPLEMENTED). [RecLineInboundOrderLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/RecLineInboundOrderLine.md) Contains information about the relationship between reception lines and inbound order lines. [ReplenishmentQueue](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReplenishmentQueue.md) Represents a replenishment order. [ReplenishmentStrategy](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReplenishmentStrategy.md) Represents a replenishment strategy. [ReplenishmentZoneStrategy](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReplenishmentZoneStrategy.md) Represents a replenishment strategy for a zone of the warehouse. [ReplenishmentZoneStrategyLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReplenishmentZoneStrategyLine.md) Represents a line of a replenishment zone strategy. [ReplenishTaskForOutboundIssueView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReplenishTaskForOutboundIssueView.md) Represent the replenish task for outbound issue view [ReplenishZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReplenishZone.md) Represents the replenish zone showed to the UI (NOT IMPLEMENTED) [Route](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Route.md) Contains information about a route. [RouteView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/RouteView.md) SQL view to represent the calculated properties of a route [ShipmentTemplate](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplate.md) Represents a shipment template. [ShipmentTemplateAssignmentStrategy](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplateAssignmentStrategy.md) Represents a shipment template assignment strategy. [ShipmentTemplateCriterion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplateCriterion.md) Represents a shipment template criterion. [ShipmentTemplateLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplateLocation.md) Represents a possible location that the grouped orders of a template can have as destination. [ShipmentTemplatePickingBatch](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplatePickingBatch.md) Shipment template picking batch [ShipmentTemplatePickingGroup](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplatePickingGroup.md) Shipment template picking group information [ShipmentTemplatePickingOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplatePickingOrder.md) Shipment template picking order [ShipmentTemplatePrepackagingStrategy](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplatePrepackagingStrategy.md) Represents a shipment template Prepackaging strategy. [ShipmentTemplateSort](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplateSort.md) Represents a shipment template sort. [ShippedStock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShippedStock.md) Represents the shipped stock and containers. [ShippingProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShippingProfile.md) Shipping profile [ShippingProfileAssignmentStrategy](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShippingProfileAssignmentStrategy.md) Represents a shipment Profile assignment strategy. [ShippingProfileRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShippingProfileRelationsBuilder.md) Generate the relations where ShippingProfile is the dependent table. [ShuttleConfig](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShuttleConfig.md) SuttleConfig entity reading [ShuttleTypeContType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShuttleTypeContType.md) ShuttleTypeContType entity reading [SpareLocationsPerRackContainerType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/SpareLocationsPerRackContainerType.md) Contains information about spare locations per rack type and container type [StackerCraneConfig](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StackerCraneConfig.md) StackerCraneConfig entity reading [StagingNotValidDocks](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StagingNotValidDocks.md) StagingNotValidDocks entity reading [Station](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Station.md) Contains information about a station. All types of stations allow some general management. [StationIdentError](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StationIdentError.md) Contains information about station identifier error [StationRoute](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StationRoute.md) Contains information about station route [StationRouteLog](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StationRouteLog.md) Contains information about station route log, where there are all the routes and its status changes [StationView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StationView.md) Contains information about station entity for SQL View - Represents a station that is a specially designated area for waiting vehicles. [Stock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Stock.md) Represents stock - Refers to the inventory of goods and materials stored in a warehouse. This stock can include raw materials, components, finished products, and other items that are kept for future use or distribution. [StockAdjust](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockAdjust.md) Stock adjust reading entity [StockAssignment](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockAssignment.md) Represents a stock assignment. [StockClassificationByZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockClassificationByZone.md) Represents a stock classification by zone. [StockClassificationByZoneLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockClassificationByZoneLine.md) Represents a class of stock classification line By Zone. [StockCountRequestConfiguration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockCountRequestConfiguration.md) Represents all the information of a programmed \[StockCountRequestConfiguration\] from a specific warehouse [StockGroupedForIncidentsView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockGroupedForIncidentsView.md) Represents stock grouped by product and unit code [StockHolderReceived](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockHolderReceived.md) Represents the stock received in a holder during the reception process. [StockHolderRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockHolderRelationsBuilder.md) Generate the relations where StockHolder is the dependent table. [StockReceived](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockReceived.md) Represents the stock received during the reception process. [StockShippedForAccount](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockShippedForAccount.md) Stock shipped for account entity [StockStatus](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockStatus.md) Contains information about the stock status [StockStatusCaptureProcess](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockStatusCaptureProcess.md) StockStatusCapptureProcess [StockStatusRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockStatusRelationsBuilder.md) Generate the relations where StockStatus is the dependent table. [StockTraceability](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockTraceability.md) Registers the stock traceability information [StockView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockView.md) Represents a stock - Refers to the inventory of goods and materials stored in a warehouse. This stock can include raw materials, components, finished products, and other items that are kept for future use or distribution. [StoreLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StoreLocation.md) Contains all data about store locations [StoreLocationErrorTraceability](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StoreLocationErrorTraceability.md) Contains information about store location putaway/deposit error traceability [StoreLocationLock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StoreLocationLock.md) Contains information about a store location lock [Subwarehouse](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Subwarehouse.md) Warehouse area that contains a group of locations. [SubwarehouseRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/SubwarehouseRelationsBuilder.md) Generate the relations where subwarehouse is the dependent table. [Supplier](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Supplier.md) Represents the supplier data showed to the UI. Indicates the procedence of the recieved stock. [SupplierType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/SupplierType.md) Represents the supplier type data showed to the UI. Object that represents the supplier classification. [SupplierTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/SupplierTypeRelationsBuilder.md) Generate the relations where SupplierType is the dependent table. [Task](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Task.md) Contains information about the task. [TransactionLog](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/TransactionLog.md) Represents information about a transaction that is displayed to the user. [TransactionType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/TransactionType.md) Represents the type of the transaction. [UnitOfMeasure](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/UnitOfMeasure.md) Unit of measure reading model. [UnitOfMeasureRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/UnitOfMeasureRelationsBuilder.md) Generate the relations where UnitOfMeasure is the dependent table. [UnitOfMeasureTranslation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/UnitOfMeasureTranslation.md) The unit of measure translation [UnitOfMeasureTranslationView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/UnitOfMeasureTranslationView.md) The unit of measure translation view [UserGroupRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/UserGroupRelationsBuilder.md) Generate the relations where UserGroup is the dependent table [Warehouse](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Warehouse.md) Represents the warehouse data showed to the UI Object that represents the current warehouse. Warehouse is the physical space used to store goods, raw materials, finished products or others items. Warehouses are essential in the supply chain because they allow companies to store their products in an organized and secure manner until they are distributed or sold the product. Generally, they are large structures with plenty of space to accommodate a large quantity of items. They use shelving systems, racks, and pallets to keep products organized and easily accessible. Additionally, they are equipped with security systems, such as surveillance cameras and alarms, to protect the store goods. Often, they have loading and unloading areas to facilitate the transportation of goods, Warehouses are fundamental to logistical efficiency and help companies manage their stocks effectively. [WarehouseRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WarehouseRelationsBuilder.md) Generate the relations where warehouse is the dependent table. [Wave](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Wave.md) **Obsolete** +Represents a wave. [WaveOutboundOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WaveOutboundOrder.md) **Obsolete** +Represents the relationship between outbound orders and waves. [WaveOutboundOrderLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WaveOutboundOrderLine.md) **Obsolete** +Represents the relationship between outbound lines and waves. [WorkingProcess](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WorkingProcess.md) Represents the working process showed to the UI [WorkingZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WorkingZone.md) Represents the working zone showed to the UI [WorkOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WorkOrder.md) Represents a work order that has to be done. Work orders enable the assembly and disassembly process of kits in the warehouse. [WorkStationReplenishmentQueue](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WorkStationReplenishmentQueue.md) **Obsolete** +Contains information used for manage replenishment queues in workstations. OBSOLETE [WorkWave](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WorkWave.md) Represents a work wave. [WorkWaveView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WorkWaveView.md) SQL view to represent the calculated properties of WorkWave. \ No newline at end of file diff --git a/docs/entities/easywms_reading_entites_outboundorder.md b/docs/entities/easywms_reading_entites_outboundorder.md new file mode 100644 index 0000000..b0a089e --- /dev/null +++ b/docs/entities/easywms_reading_entites_outboundorder.md @@ -0,0 +1,137 @@ +## OutboundOrder + +Full name: **Mecalux.ITSW.EasyWMS.Modules.Expeditions.Reading.Domain.OutboundOrder** + +## Summary + +Represents an outbound order - Is used for managing and tracking outbound orders. It includes key details. + +## Properties + +| Name | Type | Description | +| --- | --- | --- | +| AccountCode | string | Gets or sets the \[Account\] code. The account code for the outbound order (An account is each of a company´s delivery points). Example: "ACC\_NIKE\_01025" | +| AccountId | Guid? | Gets or sets the \[Account\] identifier. The account identifier for the outbound order (An account is each of a company´s delivery points). Example: 85f988c3-t2f4-44fc-bd2d-ca3db667812t. | +| Address | [Address](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/Address.md) | Gets or sets the \[Address\]. The delivery address for the outbound order - Represents a physical address with properties (Street, number, door, floor, letter, city, neighborhood, country, zipcode and comments about the address). | +| AgencyCode | string | Gets or sets the \[Agency\] code. The carrier code for the outbound order (Transport agency code. There must be the transport agency code). Example: "SEUR" | +| AgencyId | Guid? | Gets or sets the \[Agency\] identifier. The carrier identifier for the outbound order (Transport agency code. There must be the transport agency code). Example: 15f9e8c3-g2f4-44fc-bd2d-ca3db667617y. | +| AllowDynamicReplenishment | bool | Indicates whether the outbound order allows dynamic replenishment. If allows dynamic replenishment (true). Otherwise (false). Example: false | +| AnyOutboundLineInWorkWave | bool | Flag that indicates if any of it's line is associated to a wave. Example: false | +| AnyStockShipped | bool | Indicates if the order has any stock shipped. Rule to get: Count all of the outbound order lines with the identifier of the outbound order, if the order has lines with quantity shipped or quantity shipped substitute greater than zero (true); otherwise (false) Example: true | +| AssignedUser | string | The user for whom the outbound order is assigned. Example: "mecalux001" | +| AutoCreated | bool | \[CANNOT BE USED\] Indicates if the outbound order has been auto created. Currently it is always `false`. | +| AutoRelease | bool | Indicates whether the outbound order should be auto released. If the outbound order should be auto released (true). Otherwise (false). Example: true | +| AutoReleaseDate | DateTime? | Indicates when the outbound order will be automatically released if the auto release flag is set to true. Example: 03/25/2025 0:00:00. | +| AutoReserve | bool | \[NOT IMPLEMENTED\] Indicates if the outbound order should reserve stock automatically. | +| AutoReserveDate | DateTime? | \[NOT IMPLEMENTED\] Indicates when the outbound order will be automatically reserved if the auto reserve flag is set to `true` | +| CalculatedNumAdjustStockIssues | long | Gets or sets the total number of adjust stock issues. | +| CalculatedNumCommunicationErrorIssues | long | Gets or sets the total number of communication error issues. | +| CalculatedNumExpiredDatesIssues | long | Gets or sets the total number of expired dates issues. | +| CalculatedNumNeedReplenishmentIssues | long | Gets or sets the total number of need replenishment issues. | +| ClientContainerTypeCode | string | The favourite container type code for picking. Example: "American". | +| ClientContainerTypeId | Guid? | The favourite container type identifier for picking. Example: 75f828c3-f2f4-44fc-bd2d-ca3db667896r. | +| Code | string | **Required** +It is a unique code that identifies the outbound order. Example: "ORDER\_SU1". | +| CreationDateOnERP | DateTime? | The ERP creation date for the outbound order. Example: 01/25/2024 0:00:00. | +| CurrentOperation | string | The operation for the outbound order. The possible values are the ones in [OutboundOrderOperation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/OutboundOrderOperation.md). Example: "Releasing" | +| CustomAttribute | CustomAttribute | Gets or sets the \[Common.Domain.CustomAttribute\]. The outbound order's custom attributes. | +| DeliveryInstruction | string | \[USED IN MULTI-CARRIER SHIPPING APP\] The delivery instructions Example: "Ensure the package is not exposed to direct sunlight or rain". | +| Description | string | It is a description of the outbound order. Example: "Includes special packaging". | +| Document | string | The outbound order document Example: "DOC01". | +| ERPCode | string | The ERP code for the outbound order. Example: "ERP\_US\_001" | +| ExpectedDockStationCode | string | The expected dock station code for the outbound order. (A dock is an area in the warehouse where trucks (or any other vehicle used to transport goods). Example: "DOCK\_01". | +| ExpectedDockStationId | Guid? | The expected dock station identifier for the outbound order. (A dock is an area in the warehouse where trucks (or any other vehicle used transport goods). Example: 88f828c3-f334-44fc-bd2d-fa3db667896t. | +| FirstTroubleDate | DateTime? | The first trouble date. It is null if no trouble has occurred. Example: 02/25/2025 0:00:00. | +| FollowSequence | bool | Indicates whether the line number should be used as a sequencing method for the preparation. If the line number should be used as a sequencing method for the preparation (true). Otherwise (false). Example: false | +| GroupType | string | The group type of the outbound order. The possible values are the ones in [GroupType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/GroupType.md) + an empty string when it is not a group. Example: Merge | +| HasTroubles | bool | Indicates whether the outbound order has troubles. Example: true. | +| IncompleteOrder | bool | Indicates whether the outbound order is incomplete (An incomplete order is when a order is not fully fulfilled, missing items, incorrect items, or partial delivery). Example: false. | +| InternalInfo | InternalInfo | Gets or sets the \[Application.Common.Domain.InternalInfo\]. The internal system information of the outbound order. | +| IsActive | bool | Indicates if the outbound order is active in the system Example: true. | +| IsSingleUnit | bool | Indicates if the outbound order is single unit. Example: true. | +| IsTenseFlow | bool | Indicates if the order is tense flow (Tense Flow is strategy that synchronizes the arrival of goods at the warehouse with their departure for distribution, reducing storage needs and costs while improving operational efficiency). Example: true | +| LoadDockStageLocationCode | string | The actual dock stage location code for the outbound order. Example: "DOCK\_03". | +| LoadDockStageLocationId | Guid? | The actual dock stage location identifier for the outbound order. Example: 09f828c3-g334-44fc-bd2d-fa3db667885g. | +| LoadDockStationCode | string | The actual dock station code for the outbound order. (A dock is an area in the warehouse where truck (or any other vehicle user to transport goods). Example: "DOCK\_02". | +| LoadDockStationId | Guid? | The actual dock station identifier for the outbound order. (A dock is an area in the warehouse where truck (or any other vehicle user to transport goods). Example: 19f828c3-g334-44fc-bd2d-fa3db667896f. | +| ManualEquipmentCode | string | The code of the manual equipment assigned to the outbound order. (It is managed by an operator using a radio frequency terminal. Manual equipment includes pallet, trucks, forklifts etc.). Example: "EQST\_PTL\_ONLYSTOCK\_01" | +| ManualEquipmentId | Guid? | The identifier of the manual equipment assigned to the outbound order. (It is managed by an operator using a radio frequency terminal. Manual equipment includes pallet, trucks, forklifts etc.). Example: 41f838c3-h354-442c-bd2d-fa32b667913y. | +| MinSupplyPercent | long | \[NOT IMPLEMENTED\] The minimum percentage of storaged stock necessary to supply stock to the order. | +| NumCancelledLines | long | The number of outbound lines from the order that are in cancelled status. | +| NumClientContainers | long | The number of client containers for the outbound order. | +| NumClosedLines | long | The number of outbound lines from the order that are in closed status. | +| NumCutInProcessTasks | long | The number of cut in process task for the outbound order. | +| NumCutPendingTasks | long | The number of cut pending task for the outbound order. | +| NumLoads | long | The number of loads for the outbound order. Example: 1 | +| NumOutboundOrderChildren | long | The number of outbound order children for the group or merge. | +| NumOutboundOrderLineDetails | long | The number of outbound order line details for the outbound order. Example: 2 | +| NumOutboundOrderLines | long | **Obsolete("Use NumTotalOutboundOrderLines")** +The number of outbound lines for the outbound order. Example: 2 | +| NumPendingTasks | long | The number of pending tasks for the outbound order. | +| NumPreparedTasks | long | The number of prepared tasks for the outbound order. | +| NumReleasedLines | long | The number of outbound lines from the order that are in released status. | +| NumStockLines | long | The number of stock lines for the outbound order. | +| NumStoppedLines | long | The number of outbound lines from the order that are stopped when the whole order is being stopped. | +| NumTotalOutboundOrderLines | long | The total number of outbound order lines. Rule to calculate: Count of all outbound order lines with the identifier of the outbound order and outbound order status different of the ´Cancelled´. Example: 5 | +| NumWavedLines | long | **Obsolete("Waves are no longer supported. Use WorkWaves")** +\[OBSOLETE\] The number of outbound lines from the outbound order included in a wave. | +| NumWaves | long | **Obsolete("Waves are no longer supported. Use WorkWaves")** +\[OBSOLETE\] The number of waves where the outbound order is included. | +| OrderWeight | decimal | **Obsolete("This field is no longer maintained. Please perform the necessary query to obtain the value")** +\[OBSOLETE\] The outbound order weight. | +| OutboundClassCode | string | Gets or sets the \[OutboundClass\] code. The outbound class code for the outbound order (The outbound class is a classification of the routes and shipping orders). Example: "SHIPPING\_GROUP\_01" | +| OutboundClassId | Guid? | Gets or sets the \[OutboundClass\] identifier. The outbound class identifier for the outbound order (The outbound class is a classification of the routes and shipping orders). Example: 08d877b3-t2e4-44fc-cd2d-ca3db667515t. | +| OutboundIssueCodes | string | Gets or sets the issues. | +| OutboundOrderGroupMasterCode | string | Gets or sets the \[OutboundOrderGroup\] code. The code of the master outbound order for the group the outbound order is part of. It is part of none, it is an empty string. Example: "GROUPING\_01". | +| OutboundOrderGroupMasterId | Guid? | Gets or sets the \[OutboundOrderGroup\] identifier. The identifier of the master outbound order for the group the outbound order is part of. It is part of none, it is null. Example: 41f838c3-h354-442c-bd2d-fa32b667913y. | +| OutboundOrderSituation | string | \[CANNOT BE USED\] The outbound order situation. | +| OutboundOrderStatus | string | **Required** +The outbound order's status. The possible values are the ones in [OutboundOrderStatus](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/OutboundOrderStatus.md). Example: "Creating" | +| OutboundType | string | The outbound order's outbound type. The possible values are the ones in [OutboundType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/OutboundType.md). Example: "Customer" | +| OwnerCode | string | Gets or sets the \[Owner\] code. The owner code for the outbound order. Example: "VW\_02". | +| OwnerId | Guid? | Gets or sets the \[Owner\] identifier. The owner identifier for the outbound order. Example: 65f828c3-t2f4-44fc-bd2d-ca3db667896g. | +| PackagingLocationCode | string | The packaging location code for the outbound order. Example: "UDISTRIBUTION\_UAP\_02". | +| PackagingLocationId | Guid? | The packaging location identifier for the outbound order. Example: 39f838c3-g354-442c-bd2d-fa32b667882g. | +| PaperPick | bool | Indicates whether the outbound order will be prepared using paper pick. (Paper picking is a process by which the operator performs the picking manually, without using the RF terminal or the work station.) Example: true. | +| PartialClosedSequence | long? | The last partial closed sequence. Example: 3 | +| PendingReceipt | bool | Indicates whether the outbound order is waiting for receiving an ASN container. True if it is waiting for an ASN to be received or otherwise is false. Example: false. | +| Planning | [Planning](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/Planning.md) | Gets or sets the \[Planning\]. The outbound order planning information. | +| PrepackagingLogic | string | The pre-packaging logic for the outbound order. The possible values are the ones in [PrepackagingLogic](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/PrepackagingLogic.md). Example: MinimumParcels | +| PrepackagingProcess | string | The pre-packaging type for the outbound order. The possible values are the ones in [PrepackagingProcess](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/PrepackagingProcess.md). Example: Preparation | +| PrepackagingType | string | The pre-packaging type for the outbound order. The possible values are the ones in [PrepackagingType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/PrepackagingType.md). Example: ERPInformed | +| PrepackagingWorkingMode | string | The pre-packaging working mode for the outbound order. The possible values are the ones in [PrepackagingWorkingMode](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/PrepackagingWorkingMode.md). Example: Strict | +| Priority | string | The outbound order priority. The possible values are the ones in [Priority](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/Priority.md). Example: "Urgent". | +| RealReleaseDate | DateTime? | Indicates the first release date for the outbound order. Example: 03/25/2025 0:00:00. | +| ReceivedFromERP | bool | Indicates whether the outbound order was received from the ERP. If received from the ERP (true). Otherwise (false). Example: true | +| ReleasedBy | string | The first user who released the outbound order. Example: "mecalux567" | +| RequiredClientContainerTypeCode | string | Gets or sets the \[ContainerType\] code. The required client container type code for picking. Example: "EuroPallet". | +| RequiredClientContainerTypeId | Guid? | Gets or sets the \[ContainerType\] identifier. The required client container type identifier for picking. Example: 85f828c3-t2f4-44fc-bd2d-ca3db667896t. | +| RouteCode | string | Gets or sets the \[Route\] code. The route code for the outbound order. Example: "NORTHERN\_ROUTE". | +| RouteId | Guid? | Gets or sets the \[Route\] identifier. The route identifier for the outbound order. Example: 48d877b3-c2e4-44fc-bd2d-ca3db667515c. | +| ShipExpiredStock | bool | Indicates if the outbound order shipped products with expired dates. | +| ShipmentTemplateCode | string | Gets or sets the \[ShipmentTemplate\] code. The code of the shipment template used in the outbound order. Example: "ST\_SINGLE\_UNIT" | +| ShipmentTemplateId | Guid? | Gets or sets the \[ShipmentTemplate\] identifier. The identifier of the shipment template used in the outbound order. Example: 21f838c3-e354-442c-td2d-ha32b667915u. | +| ShippingDeadline | DateTime? | Gets the shipping deadline. | +| ShippingDeadlineManuallySet | bool | Indicates whether the shipping deadline was received from the assistant. If received from the assistant (true). Otherwise (false). | +| ShipReq | [ShippingRequirements](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/ShippingRequirements.md) | Gets or sets the \[ShippingRequirements\]. The outbound order shipping requirements. | +| SkipTroubledTasks | bool | The flag to skip troubled tasks. When `true`, troubled tasks will be skipped. When `false`, they will block the execution of the following tasks. Example: true | +| Source | string | The outbound order source. Example: "L10". | +| SubwarehouseCode | string | Gets or sets the \[Subwarehouse\] code. The subwarehouse code for the outbound order (Subwarehouses is grouping locations to build rules that apply over a specific warehouse area or locations subset). Example: "ST\_SINGLE\_UNIT" | +| SubwarehouseId | Guid? | Gets or sets the \[Subwarehouse\] identifier. The subwarehouse identifier for the outbound order (Subwarehouses is grouping locations to build rules that apply over a specific warehouse area or locations subset). Example: 32f838c3-ef54-442c-td2d-ha32b6679r5g. | +| SupplierCode | string | Gets or sets the \[Supplier\] code. The supplier code for the outbound order (A supplier is a company or entity that supplies stock to the node). Example: "NIKE" | +| SupplierId | Guid? | Gets or sets the \[Supplier\] identifier. The supplier identifier for the outbound order (A supplier is a company or entity that supplies stock to the node). Example: 25f9e8c3-g2f4-45fc-bd2d-ca3db667718u. | +| TenseFlowStageCode | string | The tense flow stage code (Tense Flow is strategy that synchronizes the arrival of goods at the warehouse with their departure for distribution, reducing storage needs and costs while improving operational efficiency). Example: "STG\_01" | +| TenseFlowStageId | Guid? | The tense flow stage identifier (Tense Flow is strategy that synchronizes the arrival of goods at the warehouse with their departure for distribution, reducing storage needs and costs while improving operational efficiency). Example: 35f838c3-fg54-542c-td2d-ha32b667190t. | +| Transport | [OutboundOrderTransport](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/OutboundOrderTransport.md) | Gets or sets the \[OutboundOrderTransport\]. The outbound order transport information. | +| ValidDate | DateTime? | \[NOT IMPLEMENTED\] The outbound order valid date. | +| WarehouseCode | string | **Required** +Gets or sets the \[Warehouse\] code. The warehouse code for the outbound order. Example: "KITDEMO\_4". | +| WarehouseId | Guid | Gets or sets the \[Warehouse\] identifier. The warehouse identifier for the outbound order. Example: 07d877b3-c2e4-44fc-bd2d-ca3db667514a. | +| WarehouseToCode | string | Gets or sets the \[Warehouse\] code. The destination warehouse code for the outbound order. Example: "WH\_STORE\_01". | +| WarehouseToId | Guid? | Gets or sets the \[Warehouse\] identifier. The destination warehouse identifier for the outbound order. Example: 18d877b3-c2e4-44fc-bd2d-ca3db667515b. | +| WorkOrderCode | string | Gets or sets the \[WorkOrder\] code. The work order code for the outbound order (assembly or disassembly of kit). Example: "WORK\_ORDER\_ASSEMBLY\_01" | +| WorkOrderId | Guid? | Gets or sets the \[WorkOrder\] identifier. The work order identifier for the outbound order (assembly or disassembly of kit). Example: 78d877b3-f2e4-44fc-bd2d-ca3db667515g. | +| WorkWaveCode | string | Gets or sets the \[WorkWave\] code. The code of the wave to which the outbound order is associated. Example: "Wave\_A" | +| WorkWaveId | Guid? | Gets or sets the \[WorkWave\] identifier. Identifier used to track and manage wave. Example: 12f838c3-ff54-542c-td2d-ha32b6679r5t. | + +If you have any suggestion or comment on this documentation, please submit it to [documentation@mecalux.com](mailto:documentation@mecalux.com) \ No newline at end of file diff --git a/docs/entities/easywms_reading_entites_outboundorder_OutboundOrderStatus.md b/docs/entities/easywms_reading_entites_outboundorder_OutboundOrderStatus.md new file mode 100644 index 0000000..be77f9d --- /dev/null +++ b/docs/entities/easywms_reading_entites_outboundorder_OutboundOrderStatus.md @@ -0,0 +1,32 @@ +## OutboundOrderStatus + +Full name: **Mecalux.ITSW.EasyWMS.Modules.Common.Domain.OutboundOrderStatus** + +## Summary + +Represents the status of outbound orders. + +## Values + +| Name | Value | Description | +| --- | --- | --- | +| Creating | 0 | The outbound order is being created. this will occur when they are created by the ERP or manually through the user interface. | +| Waiting | 1 | The outbound order is waiting to be released. this will occur when the order is correctly received from the ERP or when it's creation is finished manually through the user interface. | +| Release | 2 | The outbound order is release and it's tasks may be generated. An order is released when it is released through the user interface, when it's auto release date is reached, when it is associated with a route with an auto release date which has been reached or when all the lines from the outbound order has been manually released. | +| PartiallyRelease | 3 | The outbound order is partially release and it's tasks may be generated. An order is partially released when one or more lines from the order, always less than it's total lines, has been released. | +| Working | 4 | The outbound order is working. The order will be in this status from the beggining to the end of it's preparation process. To be in this status, one of it's generated tasks must be "In Process" status. | +| PartiallyWorking | 5 | The outbound order is partially working. The order will be in this status from the beggining to the end of it's preparation process. Only the orders with the status "PartiallyRelease" can change to this status. To be in this status, one of it's generated tasks must be "In Process" status. | +| Pausing | 6 | The outbound order is being paused. Not used. | +| Paused | 7 | The outbound order was paused. All it's work has been halted and it's tasks will be cancelled. This can occur when the order has been paused from the user interface. | +| Cancelling | 8 | The outbound order is being cancelled. Not used. | +| Cancelled | 9 | The outbound order was cancelled. All it's work will be halted, it's tasks will be cancelled and the assigned stock to the order will be unassigned | +| Closing | 10 | The outbound order is being closed. Not used. | +| Closed | 11 | The outbound order was closed. The preparation process of it's lines has been finished and the order is ready to ship or already shipped. This will occur when a user close the order through the user interface or when the system is configured to auto close al prepared orders. Also, the order will be archived if the system is configured as well to auto archive closed orders. | +| Expired | 12 | The outbound order is outdated. The outbound order was not released before the valid date. Not used. | +| StockFailure | 13 | The outbound order has all theirs lines on stock failure. An order will be in this status when it has been released and all of it's lines couldn't be assigned | +| Merged | 14 | The outbound order was merged. The orders in this status has been fused through the user interface. | +| Grouped | 15 | The outbound order was grouped. The orders in this status has been grouped through the user interface or automatically from a shipment template configured by the user. | +| Secured | 16 | The outbound order has its stock secured. The orders in this status has been secured through the user interface and has a secured quantity. | +| Assigned | 17 | The outbound order has its stock assigned. The orders in this status has been assigned through the user interface and has a assigned quantity. | + +If you have any suggestion or comment on this documentation, please submit it to [documentation@mecalux.com](mailto:documentation@mecalux.com) \ No newline at end of file diff --git a/docs/getting_started.md b/docs/getting_started.md new file mode 100644 index 0000000..8a7e23f --- /dev/null +++ b/docs/getting_started.md @@ -0,0 +1,108 @@ +# MAP - Documentation Portal + +## Table des matières + +### Documents et téléchargements +- [Documents and downloads](docs_downloads/index.md) +- Accès aux documents et ressources téléchargeables + +### Notes de version +- [Release notes](ReleaseNotes.md) +- Historique des versions et changements + +### Tutoriels vidéo +- [Video tutorials](video_tutorials/index.md) +- Guides vidéo pour l'utilisation du système + +### Newsletter +- [Newsletter](newsletter/index.md) +- Actualités et mises à jour + +--- + +## Informations système + +### Architecture +- [Architecture](arquitecture/index.md) +- [SaaS](arquitecture/saas.md) +- Vue d'ensemble de l'architecture système + +### Sécurité +- [Security](security/index.md) +- Politiques et protocoles de sécurité + +### Exigences matérielles +- [Hardware requirements](hardware_requirements/index.md) +- Configuration matérielle requise + +### Mode de licence +- [License mode](license_mode/index.md) +- Informations sur les licences + +--- + +## Fonctionnalités et processus d'entrepôt + +### Services à valeur ajoutée +- [Value-Added Services (VAS)](areas/vas/index.md) + +### Gestion de la chaîne logistique +- [Supply Chain Event Management](areas/supply_chain_event_management/index.md) +- [Multi Carrier Shipping Software](areas/multi_carrier_shipping/index.md) + +### Commerce et fabrication +- [eCommerce](areas/ecommerce/index.md) +- [WMS for Manufacturing](areas/manufacturing/index.md) +- [Marketplaces Integration](areas/marketplaces/index.md) + +### Systèmes de gestion +- [Labor Management System (LMS)](areas/labor_management/index.md) +- [Yard Management System (YMS)](areas/yard_management/index.md) + +### Automatisation et robotique +- [Pallet Shuttle](areas/pallet_shuttle/index.md) +- [AGVs](areas/agvs/index.md) +- [Movirack](areas/movirack/index.md) +- [Cobot](areas/cobot/index.md) +- [Automation Dashboard](areas/faults_management/index.md) + +### Solutions 3PL +- [Store fulfillment](areas/store_fulfillment/index.md) +- [3PL Client Portal](areas/tpl_portal/index.md) +- [3PL Billing](areas/billing/index.md) +- [Client-Specific Rules](areas/directives/index.md) + +### Optimisation +- [Slotting for WMS](areas/slotting/index.md) +- [APS3d](areas/aps3d/index.md) + +--- + +## Processus opérationnels + +### Réception et stockage +- [Receipts](areas/receptions/index.md) - Processus de réception des marchandises +- [Putaway](areas/putaway/index.md) - Mise en stock des produits + +### Préparation et expédition +- [Replenishment](areas/replenishments/index.md) - Réapprovisionnement +- [Picking, shipping](areas/shipping/index.md) - Préparation et expédition des commandes + +### Gestion de l'inventaire +- [Layout](areas/layout/index.md) - Configuration de l'entrepôt +- [Inventory management](areas/inventory_management/index.md) - Gestion des stocks +- [Counts](areas/counts/index.md) - Inventaires +- [Kits](areas/kits/index.md) - Assemblage de kits +- [Defragmentation](areas/defragmentation/index.md) - Optimisation de l'espace + +### Opérations spéciales +- [Consolidation](areas/consolidation/index.md) - Consolidation des commandes +- [Crossdocking](areas/crossdocking/index.md) - Transfert direct +- [Tense Flow](areas/tense_flow/index.md) - Flux tendu + +### Gestion et analyse +- [Reports](areas/reports/index.md) - Rapports +- [Data analytics](areas/data_analytics/index.md) - Tableaux de bord et analyses +- [Tasks](areas/tasks/index.md) - Gestion des tâches + + diff --git a/easywms_reading_entites.md b/easywms_reading_entites.md new file mode 100644 index 0000000..ebba898 --- /dev/null +++ b/easywms_reading_entites.md @@ -0,0 +1,17 @@ +[Account](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Account.md) Reading model for an account [AccountType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AccountType.md) Reading model for a account type [AccountTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AccountTypeRelationsBuilder.md) Generate the relations where AccountType is the dependent table. [Agency](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Agency.md) Represents the agency data showed to the UI [AgencyRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AgencyRelationsBuilder.md) Generate the relations where Agency is the dependent table. [AggregateAttachment](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AggregateAttachment.md) Represents the aggregate attachment showed to the UI [AggregateNote](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AggregateNote.md) Represents the aggregate note showed to the UI [Aisle](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aisle.md) Defines the physical characteristics of aisle. Aisle in a warehouse is a corridor used for the movement of people and equipament, facilitiating access and the handling of goods. [AisleType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AisleType.md) Defines the characteristics of the aisle type. [Alias](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Alias.md) Alias entity reading [AlternativeProduct](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AlternativeProduct.md) Alternative product entity reading [Aps3DAutomaticLock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DAutomaticLock.md) Defines the characteristics of the Aps3D automatic lock [Aps3DChannelInUseBehaviour](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DChannelInUseBehaviour.md) Defines the characteristics of the Aps3D behaviour when the cannel is in use [Aps3DChargeCriterion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DChargeCriterion.md) Defines the characteristics of the Aps3D Charge Criterion [Aps3DChargeCriterionProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DChargeCriterionProfile.md) Represents the relationship between an Aps 3D charge profile and Aps 3D charge criterion [Aps3DChargeProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DChargeProfile.md) Defines the characteristics of the Aps3D Charge Profile [Aps3DChargeTime](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DChargeTime.md) Defines the characteristics of the Aps3D Charge time [Aps3DChargeTimeProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DChargeTimeProfile.md) Represents the relationship between an Aps 3D charge profile and Aps 3D charge time [Aps3DConfiguration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Aps3DConfiguration.md) Defines the characteristics of the Aps3D Configuration [AssignedCobotTool](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/AssignedCobotTool.md) Reading entity for assigned cobot tool [BarcodeFC](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeFC.md) Contains information about the first character of the barcode [BarcodeFCRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeFCRelationsBuilder.md) Generate the relations where barcode FC is the dependent table. [BarcodeIA](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeIA.md) Contains information about barcode IA. [BarcodeIALabel](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeIALabel.md) Contains information about barcode IA label. [BarcodeIARelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeIARelationsBuilder.md) Generate the relations where barcode IA is the dependent table. [BarcodeLabel](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeLabel.md) Contains information about the barcode label. [BarcodeLabelRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeLabelRelationsBuilder.md) Generate the relations where barcode label is the dependent table. [BarcodeLabelType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/BarcodeLabelType.md) Contains information about barcode label type. [Cart](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Cart.md) Represents a cart [ChildLot](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ChildLot.md) Child lot. [ClassificationZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ClassificationZone.md) Contains information about the reception line. [ClientStock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ClientStock.md) **Obsolete** +Represents the Client stock and containers. [CobotMode](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CobotMode.md) Reading entity for cobot mode [CobotTool](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CobotTool.md) Reading entity for cobot tool [Company](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Company.md) Reading model for a company [CompanyRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CompanyRelationsBuilder.md) Generate the relations where Company is the dependent table. [CompanyView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CompanyView.md) Location entity for SQL View [Computer](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Computer.md) Computer for reading model [ConfigEntity](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ConfigEntity.md) ConfigEntity for reading model [ConfigurationAttachment](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ConfigurationAttachment.md) Contains information about the configuration attachment. [ConsolidationFeature](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ConsolidationFeature.md) Contains information about consolidation feature. [ConsolidationFeatureStation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ConsolidationFeatureStation.md) Contains information between the relationship of a consolidation feature and a station [ConsolidationOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ConsolidationOrder.md) Contains information about consolidation order. [ConsolidationOrderLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ConsolidationOrderLine.md) Contains information about consolidation order line. [Container](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Container.md) Contains information about a container. A container is a box or a pallet identified by a code and usually labelled. [ContainerAsnEquivalentGroup](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerAsnEquivalentGroup.md) Defines the physical characteristics of the container asn equivalent group [ContainerLock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerLock.md) Contains information about the container Lock [ContainerLockType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerLockType.md) Contains information about the type of container lock. [ContainerSearchLocationTrace](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerSearchLocationTrace.md) Contains information about container search location trace [ContainerType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerType.md) Defines the physical characteristics of the container type [ContainerTypePLC](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerTypePLC.md) Contains information about container type PLC. [ContainerTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerTypeRelationsBuilder.md) Generate the relations where ContainerType is the dependent table. [ContainerTypeStackableBy](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ContainerTypeStackableBy.md) Contains information on the relationships of the container types that can hold a containerType. [CountLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CountLocation.md) Represents a count location. [CountOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CountOrder.md) Represents a count order. [CountOrderLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CountOrderLine.md) Represents a count order line. [CountProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CountProfile.md) Count profile reading model. [CraneTypeContType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CraneTypeContType.md) Defines the physical characteristics of the crane type container types. [CuttingProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CuttingProfile.md) Location profile reading model. [CuttingProfileStation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CuttingProfileStation.md) Contains information about the cutting profile station. [CycleCountIteration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CycleCountIteration.md) Represents a cycle count iteration. [CycleCountIterationView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CycleCountIterationView.md) SQL view to represent the calculated properties of a cycle count iteration [CycleCountSchedule](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/CycleCountSchedule.md) Represents a cycle count schedule. [Division](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Division.md) Defines the characteristics of a stock holder division [DivisionType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/DivisionType.md) Defines the physical characteristics of a division type. [DivisionTypeElement](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/DivisionTypeElement.md) Defines the physical characteristics of a division type element. [DivisionTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/DivisionTypeRelationsBuilder.md) Generate the relations where DivisionType is the dependent table. [ExclusiveSecurement](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ExclusiveSecurement.md) Represents an exclusive securement for a container or stock [ExclusiveSecurementView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ExclusiveSecurementView.md) **Obsolete** +Represents an exclusive securement for a container or stock [GalileoEnd](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/GalileoEnd.md) Contains information about a galileo end. [GalileoEvent](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/GalileoEvent.md) Contains information about a galileo event. [Hazard](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Hazard.md) Contains information about the hazard. [HazardClass](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/HazardClass.md) Hazard class for reading model. [HazardClassRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/HazardClassRelationsBuilder.md) Generate the relations where HazardClass is the dependent table. [HazardRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/HazardRelationsBuilder.md) Generate the relations where Hazard is the dependent table. [HeightTypePLC](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/HeightTypePLC.md) Contains information about a height type PLC. [Image](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Image.md) Reading model for an image [InboundClass](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/InboundClass.md) Inbound class. Used to allow the receipt process to be customized. [InboundLinesForOutboundOrderView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/InboundLinesForOutboundOrderView.md) Represents inbound lines for outbound order view [InboundOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/InboundOrder.md) Represents the notice of a number of items expected to be received in the warehouse. It is usually related to a sale order but it can also be related to a return, a transfer from another warehouse, a production line created goods, etc. [InboundOrderLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/InboundOrderLine.md) [InboundSecurement](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/InboundSecurement.md) Represents the securement of the stock to be received in the warehouse for an shipping order or an account [Kit](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Kit.md) Represents an item made up by other items that act as its components. [KitComponent](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/KitComponent.md) Represents each component necessary to assembly a kit. [KitComponentStock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/KitComponentStock.md) Represents the stock consumed to assemble a kit. [KitStock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/KitStock.md) Contains information about the KitStock. Represents the stock which is consumed or is created in a KitAssembly or KitDissasembly process. It is used mainly in ERP communications. [LiftConfig](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LiftConfig.md) Contains information about the lift configuration. [LiftTypeContType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LiftTypeContType.md) Contains information between the relationship of lift type and container type. [Load](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Load.md) Represents a truck load. [LoadConfiguration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LoadConfiguration.md) Represents a load configuration. [LoadedContainer](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LoadedContainer.md) **Obsolete** +Contains information about a container loaded in load truck. [LoadedStock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LoadedStock.md) **Obsolete** +Represents a container loaded stock in load truck. [LoadForView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LoadForView.md) SQL view to represent the calculated properties of a truck load. [Location](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Location.md) Defines the characteristics of a location - It is used for the management of stock, containers, areas within the warehouse,... can be physical or virtual locations [LocationContainerType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LocationContainerType.md) Location container type allowed reading model. Represents the container type allowed in the given location. [LocationLockType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LocationLockType.md) Defines the characteristics of a location lock type. [LocationRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LocationRelationsBuilder.md) Generate the relations where Location is the dependent table. [LocationStack](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LocationStack.md) Defines the stack of a location. A location can be formed by several stacks (i.e. clasimat locations). [LocationView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LocationView.md) Location entity for SQL View. [LogisticAttribute](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticAttribute.md) Represents a logistic attribute. [LogisticAttributeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticAttributeRelationsBuilder.md) Generate the relations where LogisticAttribute is the dependent table [LogisticBehaviour](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticBehaviour.md) Represents a logistic behaviour [LogisticCapture](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticCapture.md) Represents a logistic attribute capture option. [LogisticProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticProfile.md) Logistic profile for reading model. [LogisticProfileCapture](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticProfileCapture.md) Represents a profile logistic capture option. [LogisticProfileRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticProfileRelationsBuilder.md) Generate the relations where LogisticProfile is the dependent table [LogisticRestrictedValue](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/LogisticRestrictedValue.md) Represents a logistic restricted value. [ManualEquipment](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ManualEquipment.md) Manual Equipment entity for reading model [ManualEquipmentType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ManualEquipmentType.md) Manual equipment type reading model. [ManualEquipmentTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ManualEquipmentTypeRelationsBuilder.md) Generate the relations where manual equipment type is the dependent table. [ManualEquipmentTypeRestriction](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ManualEquipmentTypeRestriction.md) Manual equipment type restriction for reading model Contains information about a manual equipment type restriction by aisle or working zone. The restriction is for a manual aisle or a working zone, but not both at same time. The restriction is for define the maximum number of equipments that can work at the same zone or for define the restriction between two different equipment types but not both at same time. [ManualEquipmentView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ManualEquipmentView.md) Manual Equipment entity for SQL View [MasterDataEntityRelationsModel](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/MasterDataEntityRelationsModel.md) Manages the relations between entities. [MasterLot](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/MasterLot.md) Master lot. [MaterialABC](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/MaterialABC.md) Defines the characteristics of the material ABC. [MaterialABCEvaluation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/MaterialABCEvaluation.md) Contains information about the ABC Evaluation. [MaterialABCEvaluationConfiguration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/MaterialABCEvaluationConfiguration.md) Contains information about the ABC Configuration. [MaterialABCRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/MaterialABCRelationsBuilder.md) Generate the relations where MaterialABC is the dependent table. [Movement](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Movement.md) Defines the characteristics of a movement. [OrderAssign](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OrderAssign.md) Represents an order assign. [Organization](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Organization.md) Contains information about organization [OrganizationRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OrganizationRelationsBuilder.md) Generate the relations where WritingOrganization is the dependent table [OutboundClass](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundClass.md) Represents an outbound class. [OutboundIssue](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundIssue.md) Represent a Outbound issue [OutboundIssueView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundIssueView.md) **Obsolete** +Represent a Outbound issue view [OutboundIssueViewV2](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundIssueViewV2.md) Represent a Outbound issue view [OutboundLineIssueView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundLineIssueView.md) Represent a Outbound issue line view [OutboundLineView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundLineView.md) SQL view to represent the calculated properties of an outbound line - Represents the details of one outbound order line [OutboundOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrder.md) Represents an outbound order - Is used for managing and tracking outbound orders. It includes key details. [OutboundOrderCancelConfiguration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderCancelConfiguration.md) Represents the configuration of the outbound order cancelation [OutboundOrderGroup](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderGroup.md) **Obsolete** +Represents a outbound order group. [OutboundOrderLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderLine.md) Represents an outbound line.- Is used for managing and tracking outbound orders lines. It includes key details. [OutboundOrderLineDetails](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderLineDetails.md) Represents an outbound order line details. [OutboundOrderLineGroup](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderLineGroup.md) **Obsolete** +Represents a outbound order line group. [OutboundOrderLoad](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderLoad.md) Represents the relationship between an outbound order and its truck loads [OutboundOrderStock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderStock.md) **Obsolete** +Represents the relationship between outbound order and its stocks [OutboundOrderUAPBoxLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderUAPBoxLocation.md) OutboundOrderUAPBoxLocation properties [OutboundOrderView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderView.md) **Obsolete** +Outbound order for view. [OutboundOrderViewV2](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OutboundOrderViewV2.md) SQL view to represent the calculated properties of an outbound order. [Owner](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Owner.md) Represents an owner [OwnerExclusion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OwnerExclusion.md) Reading Entity for OwnerExclusion [OwnerRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/OwnerRelationsBuilder.md) Generate the relations where Owner is the dependent table [PackageReading](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PackageReading.md) Defines the characteristics of a package. [Parameter](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Parameter.md) Represents a parameter. [ParameterAllowedValue](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ParameterAllowedValue.md) Represents an allow value of a parameter [ParameterRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ParameterRelationsBuilder.md) Generate the relations where Parameter is the dependent table. [ParamValue](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ParamValue.md) Represents a param value. [PartitionLabel](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PartitionLabel.md) Represent a partition label [PartitionLabelView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PartitionLabelView.md) Represent a partition label [Permission](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Permission.md) Contains information about the permission. [PickingZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PickingZone.md) Represents the picking zone showed to the UI [PkMpConfig](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PkMpConfig.md) Defines the characteristics of the relation between a PK station and its MP station. [PkMpConfigView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PkMpConfigView.md) PKMPConfig entity for SQL View. [PrepackagingLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PrepackagingLine.md) Represents a PrepackagingLine. [PrintConfiguration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PrintConfiguration.md) Print configuration entity [Printer](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Printer.md) Printer for reading model [PriorityProductLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PriorityProductLocation.md) Represents a priority product location [Product](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Product.md) Product entity reading [ProductClassExclusion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductClassExclusion.md) Class for product class exclusions. [ProductConversion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductConversion.md) Contains information about a conversion for a product [ProductConversionContainerType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductConversionContainerType.md) Contains information about the relationship between a container type and a product conversion (eg. the maximum amount) [ProductConversionView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductConversionView.md) ProductConversion for view. [ProductFamily](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductFamily.md) Product family reading model. [ProductFamilyExclusion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductFamilyExclusion.md) Class for product family exclusions. [ProductFamilyRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductFamilyRelationsBuilder.md) Generate the relations where ProductFamily is the dependent table. [ProductLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductLocation.md) Represents a product location. [ProductLocationPartitionLabel](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductLocationPartitionLabel.md) Represents a product location partition label. [ProductLocationView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductLocationView.md) Represents a product location. [ProductPack](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductPack.md) Information about the productPack [ProductTranslation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductTranslation.md) The product translation [ProductTranslationView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductTranslationView.md) The product translation view [ProductType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductType.md) Product type reading model. [ProductTypeExclusion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductTypeExclusion.md) Product type exclusion reading model. [ProductTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductTypeRelationsBuilder.md) Generate the relations where ProductType is the dependent table. [ProductView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductView.md) **Obsolete** +Product for view. [ProductViewV2](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ProductViewV2.md) Product for view. [PsGroup](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PsGroup.md) Reading Entity for PsGroup [PsGroupDetail](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PsGroupDetail.md) Reading Entity for PsGroupDetail [PsGroupOrderAssign](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PsGroupOrderAssign.md) Reading Entity for PSGroupOrderAssign [PtlController](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlController.md) Represents a ptl controller. [PtlDevice](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlDevice.md) Represents a ptl device. [PtlDeviceType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlDeviceType.md) Represents a PTL device type. [PtlLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlLocation.md) Represents a location of a PTL device. [PtlOrderAssignment](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlOrderAssignment.md) Represents a PTL order assignment to an equipment. [PtlService](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlService.md) Represents a PTL service. [PtlZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PtlZone.md) Represents a PTL zone. [PutawayProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PutawayProfile.md) Defines the characteristics of a putaway profile. [PutawayProfileRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PutawayProfileRelationsBuilder.md) Generate the relations where PutawayProfile is the dependent table. [PutawayZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/PutawayZone.md) Defines the characteristics of a putaway zone. [RackType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/RackType.md) Represents the rackType data showed to the UI [RackTypeContainerType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/RackTypeContainerType.md) Constains the relations rackType-containerType [RackTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/RackTypeRelationsBuilder.md) Generate the relations where RackType is the dependent table. [Reason](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Reason.md) Reason [ReasonProcessType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReasonProcessType.md) ProcessTypeReason [Reception](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Reception.md) Contains information about the receipt. Notice of a number of items expected to be received in the warehouse. [ReceptionInboundOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionInboundOrder.md) Contains information about the relationship between receptions and inbound orders. [ReceptionLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionLine.md) Represents the reception line. [ReceptionManualEquipment](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionManualEquipment.md) **Obsolete** +Contains information about the relationship between receptions and manual equipments. (NOT IMPLEMENTED). [ReceptionProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionProfile.md) Reception profile reading model. [ReceptionProfileDefaultStatus](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionProfileDefaultStatus.md) Reception profile default status reading model. [ReceptionProfileRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionProfileRelationsBuilder.md) Generate the relations where ReceptionProfile is the dependent table. [ReceptionUser](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReceptionUser.md) **Obsolete** +Contains information about the relationship between receptions and users. (NOT IMPLEMENTED). [RecLineInboundOrderLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/RecLineInboundOrderLine.md) Contains information about the relationship between reception lines and inbound order lines. [ReplenishmentQueue](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReplenishmentQueue.md) Represents a replenishment order. [ReplenishmentStrategy](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReplenishmentStrategy.md) Represents a replenishment strategy. [ReplenishmentZoneStrategy](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReplenishmentZoneStrategy.md) Represents a replenishment strategy for a zone of the warehouse. [ReplenishmentZoneStrategyLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReplenishmentZoneStrategyLine.md) Represents a line of a replenishment zone strategy. [ReplenishTaskForOutboundIssueView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReplenishTaskForOutboundIssueView.md) Represent the replenish task for outbound issue view [ReplenishZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ReplenishZone.md) Represents the replenish zone showed to the UI (NOT IMPLEMENTED) [Route](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Route.md) Contains information about a route. [RouteView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/RouteView.md) SQL view to represent the calculated properties of a route [ShipmentTemplate](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplate.md) Represents a shipment template. [ShipmentTemplateAssignmentStrategy](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplateAssignmentStrategy.md) Represents a shipment template assignment strategy. [ShipmentTemplateCriterion](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplateCriterion.md) Represents a shipment template criterion. [ShipmentTemplateLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplateLocation.md) Represents a possible location that the grouped orders of a template can have as destination. [ShipmentTemplatePickingBatch](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplatePickingBatch.md) Shipment template picking batch [ShipmentTemplatePickingGroup](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplatePickingGroup.md) Shipment template picking group information [ShipmentTemplatePickingOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplatePickingOrder.md) Shipment template picking order [ShipmentTemplatePrepackagingStrategy](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplatePrepackagingStrategy.md) Represents a shipment template Prepackaging strategy. [ShipmentTemplateSort](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShipmentTemplateSort.md) Represents a shipment template sort. [ShippedStock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShippedStock.md) Represents the shipped stock and containers. [ShippingProfile](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShippingProfile.md) Shipping profile [ShippingProfileAssignmentStrategy](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShippingProfileAssignmentStrategy.md) Represents a shipment Profile assignment strategy. [ShippingProfileRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShippingProfileRelationsBuilder.md) Generate the relations where ShippingProfile is the dependent table. [ShuttleConfig](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShuttleConfig.md) SuttleConfig entity reading [ShuttleTypeContType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/ShuttleTypeContType.md) ShuttleTypeContType entity reading [SpareLocationsPerRackContainerType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/SpareLocationsPerRackContainerType.md) Contains information about spare locations per rack type and container type [StackerCraneConfig](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StackerCraneConfig.md) StackerCraneConfig entity reading [StagingNotValidDocks](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StagingNotValidDocks.md) StagingNotValidDocks entity reading [Station](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Station.md) Contains information about a station. All types of stations allow some general management. [StationIdentError](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StationIdentError.md) Contains information about station identifier error [StationRoute](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StationRoute.md) Contains information about station route [StationRouteLog](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StationRouteLog.md) Contains information about station route log, where there are all the routes and its status changes [StationView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StationView.md) Contains information about station entity for SQL View - Represents a station that is a specially designated area for waiting vehicles. [Stock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Stock.md) Represents stock - Refers to the inventory of goods and materials stored in a warehouse. This stock can include raw materials, components, finished products, and other items that are kept for future use or distribution. [StockAdjust](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockAdjust.md) Stock adjust reading entity [StockAssignment](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockAssignment.md) Represents a stock assignment. [StockClassificationByZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockClassificationByZone.md) Represents a stock classification by zone. [StockClassificationByZoneLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockClassificationByZoneLine.md) Represents a class of stock classification line By Zone. [StockCountRequestConfiguration](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockCountRequestConfiguration.md) Represents all the information of a programmed \[StockCountRequestConfiguration\] from a specific warehouse [StockGroupedForIncidentsView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockGroupedForIncidentsView.md) Represents stock grouped by product and unit code [StockHolderReceived](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockHolderReceived.md) Represents the stock received in a holder during the reception process. [StockHolderRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockHolderRelationsBuilder.md) Generate the relations where StockHolder is the dependent table. [StockReceived](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockReceived.md) Represents the stock received during the reception process. [StockShippedForAccount](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockShippedForAccount.md) Stock shipped for account entity [StockStatus](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockStatus.md) Contains information about the stock status [StockStatusCaptureProcess](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockStatusCaptureProcess.md) StockStatusCapptureProcess [StockStatusRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockStatusRelationsBuilder.md) Generate the relations where StockStatus is the dependent table. [StockTraceability](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockTraceability.md) Registers the stock traceability information [StockView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StockView.md) Represents a stock - Refers to the inventory of goods and materials stored in a warehouse. This stock can include raw materials, components, finished products, and other items that are kept for future use or distribution. [StoreLocation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StoreLocation.md) Contains all data about store locations [StoreLocationErrorTraceability](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StoreLocationErrorTraceability.md) Contains information about store location putaway/deposit error traceability [StoreLocationLock](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/StoreLocationLock.md) Contains information about a store location lock [Subwarehouse](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Subwarehouse.md) Warehouse area that contains a group of locations. [SubwarehouseRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/SubwarehouseRelationsBuilder.md) Generate the relations where subwarehouse is the dependent table. [Supplier](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Supplier.md) Represents the supplier data showed to the UI. Indicates the procedence of the recieved stock. [SupplierType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/SupplierType.md) Represents the supplier type data showed to the UI. Object that represents the supplier classification. [SupplierTypeRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/SupplierTypeRelationsBuilder.md) Generate the relations where SupplierType is the dependent table. [Task](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Task.md) Contains information about the task. [TransactionLog](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/TransactionLog.md) Represents information about a transaction that is displayed to the user. [TransactionType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/TransactionType.md) Represents the type of the transaction. [UnitOfMeasure](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/UnitOfMeasure.md) Unit of measure reading model. [UnitOfMeasureRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/UnitOfMeasureRelationsBuilder.md) Generate the relations where UnitOfMeasure is the dependent table. [UnitOfMeasureTranslation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/UnitOfMeasureTranslation.md) The unit of measure translation [UnitOfMeasureTranslationView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/UnitOfMeasureTranslationView.md) The unit of measure translation view [UserGroupRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/UserGroupRelationsBuilder.md) Generate the relations where UserGroup is the dependent table [Warehouse](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Warehouse.md) Represents the warehouse data showed to the UI Object that represents the current warehouse. Warehouse is the physical space used to store goods, raw materials, finished products or others items. Warehouses are essential in the supply chain because they allow companies to store their products in an organized and secure manner until they are distributed or sold the product. Generally, they are large structures with plenty of space to accommodate a large quantity of items. They use shelving systems, racks, and pallets to keep products organized and easily accessible. Additionally, they are equipped with security systems, such as surveillance cameras and alarms, to protect the store goods. Often, they have loading and unloading areas to facilitate the transportation of goods, Warehouses are fundamental to logistical efficiency and help companies manage their stocks effectively. [WarehouseRelationsBuilder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WarehouseRelationsBuilder.md) Generate the relations where warehouse is the dependent table. [Wave](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/Wave.md) **Obsolete** +Represents a wave. [WaveOutboundOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WaveOutboundOrder.md) **Obsolete** +Represents the relationship between outbound orders and waves. [WaveOutboundOrderLine](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WaveOutboundOrderLine.md) **Obsolete** +Represents the relationship between outbound lines and waves. [WorkingProcess](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WorkingProcess.md) Represents the working process showed to the UI [WorkingZone](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WorkingZone.md) Represents the working zone showed to the UI [WorkOrder](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WorkOrder.md) Represents a work order that has to be done. Work orders enable the assembly and disassembly process of kits in the warehouse. [WorkStationReplenishmentQueue](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WorkStationReplenishmentQueue.md) **Obsolete** +Contains information used for manage replenishment queues in workstations. OBSOLETE [WorkWave](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WorkWave.md) Represents a work wave. [WorkWaveView](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Reading/WorkWaveView.md) SQL view to represent the calculated properties of WorkWave. \ No newline at end of file diff --git a/easywms_reading_entites_outboundorder.md b/easywms_reading_entites_outboundorder.md new file mode 100644 index 0000000..b0a089e --- /dev/null +++ b/easywms_reading_entites_outboundorder.md @@ -0,0 +1,137 @@ +## OutboundOrder + +Full name: **Mecalux.ITSW.EasyWMS.Modules.Expeditions.Reading.Domain.OutboundOrder** + +## Summary + +Represents an outbound order - Is used for managing and tracking outbound orders. It includes key details. + +## Properties + +| Name | Type | Description | +| --- | --- | --- | +| AccountCode | string | Gets or sets the \[Account\] code. The account code for the outbound order (An account is each of a company´s delivery points). Example: "ACC\_NIKE\_01025" | +| AccountId | Guid? | Gets or sets the \[Account\] identifier. The account identifier for the outbound order (An account is each of a company´s delivery points). Example: 85f988c3-t2f4-44fc-bd2d-ca3db667812t. | +| Address | [Address](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/Address.md) | Gets or sets the \[Address\]. The delivery address for the outbound order - Represents a physical address with properties (Street, number, door, floor, letter, city, neighborhood, country, zipcode and comments about the address). | +| AgencyCode | string | Gets or sets the \[Agency\] code. The carrier code for the outbound order (Transport agency code. There must be the transport agency code). Example: "SEUR" | +| AgencyId | Guid? | Gets or sets the \[Agency\] identifier. The carrier identifier for the outbound order (Transport agency code. There must be the transport agency code). Example: 15f9e8c3-g2f4-44fc-bd2d-ca3db667617y. | +| AllowDynamicReplenishment | bool | Indicates whether the outbound order allows dynamic replenishment. If allows dynamic replenishment (true). Otherwise (false). Example: false | +| AnyOutboundLineInWorkWave | bool | Flag that indicates if any of it's line is associated to a wave. Example: false | +| AnyStockShipped | bool | Indicates if the order has any stock shipped. Rule to get: Count all of the outbound order lines with the identifier of the outbound order, if the order has lines with quantity shipped or quantity shipped substitute greater than zero (true); otherwise (false) Example: true | +| AssignedUser | string | The user for whom the outbound order is assigned. Example: "mecalux001" | +| AutoCreated | bool | \[CANNOT BE USED\] Indicates if the outbound order has been auto created. Currently it is always `false`. | +| AutoRelease | bool | Indicates whether the outbound order should be auto released. If the outbound order should be auto released (true). Otherwise (false). Example: true | +| AutoReleaseDate | DateTime? | Indicates when the outbound order will be automatically released if the auto release flag is set to true. Example: 03/25/2025 0:00:00. | +| AutoReserve | bool | \[NOT IMPLEMENTED\] Indicates if the outbound order should reserve stock automatically. | +| AutoReserveDate | DateTime? | \[NOT IMPLEMENTED\] Indicates when the outbound order will be automatically reserved if the auto reserve flag is set to `true` | +| CalculatedNumAdjustStockIssues | long | Gets or sets the total number of adjust stock issues. | +| CalculatedNumCommunicationErrorIssues | long | Gets or sets the total number of communication error issues. | +| CalculatedNumExpiredDatesIssues | long | Gets or sets the total number of expired dates issues. | +| CalculatedNumNeedReplenishmentIssues | long | Gets or sets the total number of need replenishment issues. | +| ClientContainerTypeCode | string | The favourite container type code for picking. Example: "American". | +| ClientContainerTypeId | Guid? | The favourite container type identifier for picking. Example: 75f828c3-f2f4-44fc-bd2d-ca3db667896r. | +| Code | string | **Required** +It is a unique code that identifies the outbound order. Example: "ORDER\_SU1". | +| CreationDateOnERP | DateTime? | The ERP creation date for the outbound order. Example: 01/25/2024 0:00:00. | +| CurrentOperation | string | The operation for the outbound order. The possible values are the ones in [OutboundOrderOperation](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/OutboundOrderOperation.md). Example: "Releasing" | +| CustomAttribute | CustomAttribute | Gets or sets the \[Common.Domain.CustomAttribute\]. The outbound order's custom attributes. | +| DeliveryInstruction | string | \[USED IN MULTI-CARRIER SHIPPING APP\] The delivery instructions Example: "Ensure the package is not exposed to direct sunlight or rain". | +| Description | string | It is a description of the outbound order. Example: "Includes special packaging". | +| Document | string | The outbound order document Example: "DOC01". | +| ERPCode | string | The ERP code for the outbound order. Example: "ERP\_US\_001" | +| ExpectedDockStationCode | string | The expected dock station code for the outbound order. (A dock is an area in the warehouse where trucks (or any other vehicle used to transport goods). Example: "DOCK\_01". | +| ExpectedDockStationId | Guid? | The expected dock station identifier for the outbound order. (A dock is an area in the warehouse where trucks (or any other vehicle used transport goods). Example: 88f828c3-f334-44fc-bd2d-fa3db667896t. | +| FirstTroubleDate | DateTime? | The first trouble date. It is null if no trouble has occurred. Example: 02/25/2025 0:00:00. | +| FollowSequence | bool | Indicates whether the line number should be used as a sequencing method for the preparation. If the line number should be used as a sequencing method for the preparation (true). Otherwise (false). Example: false | +| GroupType | string | The group type of the outbound order. The possible values are the ones in [GroupType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/GroupType.md) + an empty string when it is not a group. Example: Merge | +| HasTroubles | bool | Indicates whether the outbound order has troubles. Example: true. | +| IncompleteOrder | bool | Indicates whether the outbound order is incomplete (An incomplete order is when a order is not fully fulfilled, missing items, incorrect items, or partial delivery). Example: false. | +| InternalInfo | InternalInfo | Gets or sets the \[Application.Common.Domain.InternalInfo\]. The internal system information of the outbound order. | +| IsActive | bool | Indicates if the outbound order is active in the system Example: true. | +| IsSingleUnit | bool | Indicates if the outbound order is single unit. Example: true. | +| IsTenseFlow | bool | Indicates if the order is tense flow (Tense Flow is strategy that synchronizes the arrival of goods at the warehouse with their departure for distribution, reducing storage needs and costs while improving operational efficiency). Example: true | +| LoadDockStageLocationCode | string | The actual dock stage location code for the outbound order. Example: "DOCK\_03". | +| LoadDockStageLocationId | Guid? | The actual dock stage location identifier for the outbound order. Example: 09f828c3-g334-44fc-bd2d-fa3db667885g. | +| LoadDockStationCode | string | The actual dock station code for the outbound order. (A dock is an area in the warehouse where truck (or any other vehicle user to transport goods). Example: "DOCK\_02". | +| LoadDockStationId | Guid? | The actual dock station identifier for the outbound order. (A dock is an area in the warehouse where truck (or any other vehicle user to transport goods). Example: 19f828c3-g334-44fc-bd2d-fa3db667896f. | +| ManualEquipmentCode | string | The code of the manual equipment assigned to the outbound order. (It is managed by an operator using a radio frequency terminal. Manual equipment includes pallet, trucks, forklifts etc.). Example: "EQST\_PTL\_ONLYSTOCK\_01" | +| ManualEquipmentId | Guid? | The identifier of the manual equipment assigned to the outbound order. (It is managed by an operator using a radio frequency terminal. Manual equipment includes pallet, trucks, forklifts etc.). Example: 41f838c3-h354-442c-bd2d-fa32b667913y. | +| MinSupplyPercent | long | \[NOT IMPLEMENTED\] The minimum percentage of storaged stock necessary to supply stock to the order. | +| NumCancelledLines | long | The number of outbound lines from the order that are in cancelled status. | +| NumClientContainers | long | The number of client containers for the outbound order. | +| NumClosedLines | long | The number of outbound lines from the order that are in closed status. | +| NumCutInProcessTasks | long | The number of cut in process task for the outbound order. | +| NumCutPendingTasks | long | The number of cut pending task for the outbound order. | +| NumLoads | long | The number of loads for the outbound order. Example: 1 | +| NumOutboundOrderChildren | long | The number of outbound order children for the group or merge. | +| NumOutboundOrderLineDetails | long | The number of outbound order line details for the outbound order. Example: 2 | +| NumOutboundOrderLines | long | **Obsolete("Use NumTotalOutboundOrderLines")** +The number of outbound lines for the outbound order. Example: 2 | +| NumPendingTasks | long | The number of pending tasks for the outbound order. | +| NumPreparedTasks | long | The number of prepared tasks for the outbound order. | +| NumReleasedLines | long | The number of outbound lines from the order that are in released status. | +| NumStockLines | long | The number of stock lines for the outbound order. | +| NumStoppedLines | long | The number of outbound lines from the order that are stopped when the whole order is being stopped. | +| NumTotalOutboundOrderLines | long | The total number of outbound order lines. Rule to calculate: Count of all outbound order lines with the identifier of the outbound order and outbound order status different of the ´Cancelled´. Example: 5 | +| NumWavedLines | long | **Obsolete("Waves are no longer supported. Use WorkWaves")** +\[OBSOLETE\] The number of outbound lines from the outbound order included in a wave. | +| NumWaves | long | **Obsolete("Waves are no longer supported. Use WorkWaves")** +\[OBSOLETE\] The number of waves where the outbound order is included. | +| OrderWeight | decimal | **Obsolete("This field is no longer maintained. Please perform the necessary query to obtain the value")** +\[OBSOLETE\] The outbound order weight. | +| OutboundClassCode | string | Gets or sets the \[OutboundClass\] code. The outbound class code for the outbound order (The outbound class is a classification of the routes and shipping orders). Example: "SHIPPING\_GROUP\_01" | +| OutboundClassId | Guid? | Gets or sets the \[OutboundClass\] identifier. The outbound class identifier for the outbound order (The outbound class is a classification of the routes and shipping orders). Example: 08d877b3-t2e4-44fc-cd2d-ca3db667515t. | +| OutboundIssueCodes | string | Gets or sets the issues. | +| OutboundOrderGroupMasterCode | string | Gets or sets the \[OutboundOrderGroup\] code. The code of the master outbound order for the group the outbound order is part of. It is part of none, it is an empty string. Example: "GROUPING\_01". | +| OutboundOrderGroupMasterId | Guid? | Gets or sets the \[OutboundOrderGroup\] identifier. The identifier of the master outbound order for the group the outbound order is part of. It is part of none, it is null. Example: 41f838c3-h354-442c-bd2d-fa32b667913y. | +| OutboundOrderSituation | string | \[CANNOT BE USED\] The outbound order situation. | +| OutboundOrderStatus | string | **Required** +The outbound order's status. The possible values are the ones in [OutboundOrderStatus](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/OutboundOrderStatus.md). Example: "Creating" | +| OutboundType | string | The outbound order's outbound type. The possible values are the ones in [OutboundType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/OutboundType.md). Example: "Customer" | +| OwnerCode | string | Gets or sets the \[Owner\] code. The owner code for the outbound order. Example: "VW\_02". | +| OwnerId | Guid? | Gets or sets the \[Owner\] identifier. The owner identifier for the outbound order. Example: 65f828c3-t2f4-44fc-bd2d-ca3db667896g. | +| PackagingLocationCode | string | The packaging location code for the outbound order. Example: "UDISTRIBUTION\_UAP\_02". | +| PackagingLocationId | Guid? | The packaging location identifier for the outbound order. Example: 39f838c3-g354-442c-bd2d-fa32b667882g. | +| PaperPick | bool | Indicates whether the outbound order will be prepared using paper pick. (Paper picking is a process by which the operator performs the picking manually, without using the RF terminal or the work station.) Example: true. | +| PartialClosedSequence | long? | The last partial closed sequence. Example: 3 | +| PendingReceipt | bool | Indicates whether the outbound order is waiting for receiving an ASN container. True if it is waiting for an ASN to be received or otherwise is false. Example: false. | +| Planning | [Planning](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/Planning.md) | Gets or sets the \[Planning\]. The outbound order planning information. | +| PrepackagingLogic | string | The pre-packaging logic for the outbound order. The possible values are the ones in [PrepackagingLogic](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/PrepackagingLogic.md). Example: MinimumParcels | +| PrepackagingProcess | string | The pre-packaging type for the outbound order. The possible values are the ones in [PrepackagingProcess](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/PrepackagingProcess.md). Example: Preparation | +| PrepackagingType | string | The pre-packaging type for the outbound order. The possible values are the ones in [PrepackagingType](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/PrepackagingType.md). Example: ERPInformed | +| PrepackagingWorkingMode | string | The pre-packaging working mode for the outbound order. The possible values are the ones in [PrepackagingWorkingMode](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/PrepackagingWorkingMode.md). Example: Strict | +| Priority | string | The outbound order priority. The possible values are the ones in [Priority](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/Priority.md). Example: "Urgent". | +| RealReleaseDate | DateTime? | Indicates the first release date for the outbound order. Example: 03/25/2025 0:00:00. | +| ReceivedFromERP | bool | Indicates whether the outbound order was received from the ERP. If received from the ERP (true). Otherwise (false). Example: true | +| ReleasedBy | string | The first user who released the outbound order. Example: "mecalux567" | +| RequiredClientContainerTypeCode | string | Gets or sets the \[ContainerType\] code. The required client container type code for picking. Example: "EuroPallet". | +| RequiredClientContainerTypeId | Guid? | Gets or sets the \[ContainerType\] identifier. The required client container type identifier for picking. Example: 85f828c3-t2f4-44fc-bd2d-ca3db667896t. | +| RouteCode | string | Gets or sets the \[Route\] code. The route code for the outbound order. Example: "NORTHERN\_ROUTE". | +| RouteId | Guid? | Gets or sets the \[Route\] identifier. The route identifier for the outbound order. Example: 48d877b3-c2e4-44fc-bd2d-ca3db667515c. | +| ShipExpiredStock | bool | Indicates if the outbound order shipped products with expired dates. | +| ShipmentTemplateCode | string | Gets or sets the \[ShipmentTemplate\] code. The code of the shipment template used in the outbound order. Example: "ST\_SINGLE\_UNIT" | +| ShipmentTemplateId | Guid? | Gets or sets the \[ShipmentTemplate\] identifier. The identifier of the shipment template used in the outbound order. Example: 21f838c3-e354-442c-td2d-ha32b667915u. | +| ShippingDeadline | DateTime? | Gets the shipping deadline. | +| ShippingDeadlineManuallySet | bool | Indicates whether the shipping deadline was received from the assistant. If received from the assistant (true). Otherwise (false). | +| ShipReq | [ShippingRequirements](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/ShippingRequirements.md) | Gets or sets the \[ShippingRequirements\]. The outbound order shipping requirements. | +| SkipTroubledTasks | bool | The flag to skip troubled tasks. When `true`, troubled tasks will be skipped. When `false`, they will block the execution of the following tasks. Example: true | +| Source | string | The outbound order source. Example: "L10". | +| SubwarehouseCode | string | Gets or sets the \[Subwarehouse\] code. The subwarehouse code for the outbound order (Subwarehouses is grouping locations to build rules that apply over a specific warehouse area or locations subset). Example: "ST\_SINGLE\_UNIT" | +| SubwarehouseId | Guid? | Gets or sets the \[Subwarehouse\] identifier. The subwarehouse identifier for the outbound order (Subwarehouses is grouping locations to build rules that apply over a specific warehouse area or locations subset). Example: 32f838c3-ef54-442c-td2d-ha32b6679r5g. | +| SupplierCode | string | Gets or sets the \[Supplier\] code. The supplier code for the outbound order (A supplier is a company or entity that supplies stock to the node). Example: "NIKE" | +| SupplierId | Guid? | Gets or sets the \[Supplier\] identifier. The supplier identifier for the outbound order (A supplier is a company or entity that supplies stock to the node). Example: 25f9e8c3-g2f4-45fc-bd2d-ca3db667718u. | +| TenseFlowStageCode | string | The tense flow stage code (Tense Flow is strategy that synchronizes the arrival of goods at the warehouse with their departure for distribution, reducing storage needs and costs while improving operational efficiency). Example: "STG\_01" | +| TenseFlowStageId | Guid? | The tense flow stage identifier (Tense Flow is strategy that synchronizes the arrival of goods at the warehouse with their departure for distribution, reducing storage needs and costs while improving operational efficiency). Example: 35f838c3-fg54-542c-td2d-ha32b667190t. | +| Transport | [OutboundOrderTransport](https://msscc.mecalux.com/documentation/Development/master/ES/apis/easywms/Domain/OutboundOrderTransport.md) | Gets or sets the \[OutboundOrderTransport\]. The outbound order transport information. | +| ValidDate | DateTime? | \[NOT IMPLEMENTED\] The outbound order valid date. | +| WarehouseCode | string | **Required** +Gets or sets the \[Warehouse\] code. The warehouse code for the outbound order. Example: "KITDEMO\_4". | +| WarehouseId | Guid | Gets or sets the \[Warehouse\] identifier. The warehouse identifier for the outbound order. Example: 07d877b3-c2e4-44fc-bd2d-ca3db667514a. | +| WarehouseToCode | string | Gets or sets the \[Warehouse\] code. The destination warehouse code for the outbound order. Example: "WH\_STORE\_01". | +| WarehouseToId | Guid? | Gets or sets the \[Warehouse\] identifier. The destination warehouse identifier for the outbound order. Example: 18d877b3-c2e4-44fc-bd2d-ca3db667515b. | +| WorkOrderCode | string | Gets or sets the \[WorkOrder\] code. The work order code for the outbound order (assembly or disassembly of kit). Example: "WORK\_ORDER\_ASSEMBLY\_01" | +| WorkOrderId | Guid? | Gets or sets the \[WorkOrder\] identifier. The work order identifier for the outbound order (assembly or disassembly of kit). Example: 78d877b3-f2e4-44fc-bd2d-ca3db667515g. | +| WorkWaveCode | string | Gets or sets the \[WorkWave\] code. The code of the wave to which the outbound order is associated. Example: "Wave\_A" | +| WorkWaveId | Guid? | Gets or sets the \[WorkWave\] identifier. Identifier used to track and manage wave. Example: 12f838c3-ff54-542c-td2d-ha32b6679r5t. | + +If you have any suggestion or comment on this documentation, please submit it to [documentation@mecalux.com](mailto:documentation@mecalux.com) \ No newline at end of file diff --git a/easywms_reading_entites_outboundorder_OutboundOrderStatus.md b/easywms_reading_entites_outboundorder_OutboundOrderStatus.md new file mode 100644 index 0000000..be77f9d --- /dev/null +++ b/easywms_reading_entites_outboundorder_OutboundOrderStatus.md @@ -0,0 +1,32 @@ +## OutboundOrderStatus + +Full name: **Mecalux.ITSW.EasyWMS.Modules.Common.Domain.OutboundOrderStatus** + +## Summary + +Represents the status of outbound orders. + +## Values + +| Name | Value | Description | +| --- | --- | --- | +| Creating | 0 | The outbound order is being created. this will occur when they are created by the ERP or manually through the user interface. | +| Waiting | 1 | The outbound order is waiting to be released. this will occur when the order is correctly received from the ERP or when it's creation is finished manually through the user interface. | +| Release | 2 | The outbound order is release and it's tasks may be generated. An order is released when it is released through the user interface, when it's auto release date is reached, when it is associated with a route with an auto release date which has been reached or when all the lines from the outbound order has been manually released. | +| PartiallyRelease | 3 | The outbound order is partially release and it's tasks may be generated. An order is partially released when one or more lines from the order, always less than it's total lines, has been released. | +| Working | 4 | The outbound order is working. The order will be in this status from the beggining to the end of it's preparation process. To be in this status, one of it's generated tasks must be "In Process" status. | +| PartiallyWorking | 5 | The outbound order is partially working. The order will be in this status from the beggining to the end of it's preparation process. Only the orders with the status "PartiallyRelease" can change to this status. To be in this status, one of it's generated tasks must be "In Process" status. | +| Pausing | 6 | The outbound order is being paused. Not used. | +| Paused | 7 | The outbound order was paused. All it's work has been halted and it's tasks will be cancelled. This can occur when the order has been paused from the user interface. | +| Cancelling | 8 | The outbound order is being cancelled. Not used. | +| Cancelled | 9 | The outbound order was cancelled. All it's work will be halted, it's tasks will be cancelled and the assigned stock to the order will be unassigned | +| Closing | 10 | The outbound order is being closed. Not used. | +| Closed | 11 | The outbound order was closed. The preparation process of it's lines has been finished and the order is ready to ship or already shipped. This will occur when a user close the order through the user interface or when the system is configured to auto close al prepared orders. Also, the order will be archived if the system is configured as well to auto archive closed orders. | +| Expired | 12 | The outbound order is outdated. The outbound order was not released before the valid date. Not used. | +| StockFailure | 13 | The outbound order has all theirs lines on stock failure. An order will be in this status when it has been released and all of it's lines couldn't be assigned | +| Merged | 14 | The outbound order was merged. The orders in this status has been fused through the user interface. | +| Grouped | 15 | The outbound order was grouped. The orders in this status has been grouped through the user interface or automatically from a shipment template configured by the user. | +| Secured | 16 | The outbound order has its stock secured. The orders in this status has been secured through the user interface and has a secured quantity. | +| Assigned | 17 | The outbound order has its stock assigned. The orders in this status has been assigned through the user interface and has a assigned quantity. | + +If you have any suggestion or comment on this documentation, please submit it to [documentation@mecalux.com](mailto:documentation@mecalux.com) \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..19077cf --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1293 @@ +{ + "name": "wms-mcp-server", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "wms-mcp-server", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@modelcontextprotocol/sdk": "^1.26.0", + "axios": "^1.6.0", + "dotenv": "^17.2.4" + }, + "bin": { + "wms-mcp-server": "src/index.js" + } + }, + "node_modules/@hono/node-server": { + "version": "1.19.9", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.9.tgz", + "integrity": "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==", + "license": "MIT", + "engines": { + "node": ">=18.14.1" + }, + "peerDependencies": { + "hono": "^4" + } + }, + "node_modules/@modelcontextprotocol/sdk": { + "version": "1.26.0", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.26.0.tgz", + "integrity": "sha512-Y5RmPncpiDtTXDbLKswIJzTqu2hyBKxTNsgKqKclDbhIgg1wgtf1fRuvxgTnRfcnxtvvgbIEcqUOzZrJ6iSReg==", + "license": "MIT", + "dependencies": { + "@hono/node-server": "^1.19.9", + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1", + "content-type": "^1.0.5", + "cors": "^2.8.5", + "cross-spawn": "^7.0.5", + "eventsource": "^3.0.2", + "eventsource-parser": "^3.0.0", + "express": "^5.2.1", + "express-rate-limit": "^8.2.1", + "hono": "^4.11.4", + "jose": "^6.1.3", + "json-schema-typed": "^8.0.2", + "pkce-challenge": "^5.0.0", + "raw-body": "^3.0.0", + "zod": "^3.25 || ^4.0", + "zod-to-json-schema": "^3.25.1" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@cfworker/json-schema": "^4.1.1", + "zod": "^3.25 || ^4.0" + }, + "peerDependenciesMeta": { + "@cfworker/json-schema": { + "optional": true + }, + "zod": { + "optional": false + } + } + }, + "node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.14.0.tgz", + "integrity": "sha512-3Y8yrqLSwjuzpXuZ0oIYZ/XGgLwUIBU3uLvbcpb0pidD9ctpShJd43KSlEEkVQg6DS0G9NKyzOvBfUtDKEyHvQ==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", + "proxy-from-env": "^2.1.0" + } + }, + "node_modules/body-parser": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz", + "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==", + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.3", + "http-errors": "^2.0.0", + "iconv-lite": "^0.7.0", + "on-finished": "^2.4.1", + "qs": "^6.14.1", + "raw-body": "^3.0.1", + "type-is": "^2.0.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/content-disposition": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", + "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/cors": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz", + "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/dotenv": { + "version": "17.2.4", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.4.tgz", + "integrity": "sha512-mudtfb4zRB4bVvdj0xRo+e6duH1csJRM8IukBqfTRvHotn9+LBXB8ynAidP9zHqoRC/fsllXgk4kCKlR21fIhw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventsource": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", + "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", + "license": "MIT", + "dependencies": { + "eventsource-parser": "^3.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/eventsource-parser": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz", + "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/express": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", + "license": "MIT", + "peer": true, + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.1", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "depd": "^2.0.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express-rate-limit": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.2.1.tgz", + "integrity": "sha512-PCZEIEIxqwhzw4KF0n7QF4QqruVTcF73O5kFKUnGOyjbCCgizBBiFaYpd/fnBLUMPw/BWw9OsiN7GgrNYr7j6g==", + "license": "MIT", + "dependencies": { + "ip-address": "10.0.1" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": ">= 4.11" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/finalhandler": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", + "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/form-data/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/form-data/node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hono": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.11.9.tgz", + "integrity": "sha512-Eaw2YTGM6WOxA6CXbckaEvslr2Ne4NFsKrvc0v97JD5awbmeBLO5w9Ho9L9kmKonrwF9RJlW6BxT1PVv/agBHQ==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ip-address": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz", + "integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/jose": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.1.3.tgz", + "integrity": "sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/json-schema-typed": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz", + "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==", + "license": "BSD-2-Clause" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-to-regexp": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/pkce-challenge": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz", + "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==", + "license": "MIT", + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/qs": { + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.7.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", + "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.3", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.1", + "mime-types": "^3.0.2", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/serve-static": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", + "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/zod": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", + "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz", + "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==", + "license": "ISC", + "peerDependencies": { + "zod": "^3.25 || ^4" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..308b654 --- /dev/null +++ b/package.json @@ -0,0 +1,30 @@ +{ + "name": "wms-mcp-server", + "version": "1.0.0", + "description": "MCP Server for WMS debugging and analysis", + "main": "src/index.js", + "bin": { + "wms-mcp-server": "./src/index.js" + }, + "scripts": { + "start": "node src/index.js", + "test": "node test-connection.js", + "build": "pkg . --targets node18-win-x64 --output dist/wms-mcp-server.exe" + }, + "keywords": ["mcp", "wms", "debugging"], + "author": "", + "license": "ISC", + "type": "commonjs", + "dependencies": { + "@modelcontextprotocol/sdk": "^1.26.0", + "axios": "^1.6.0", + "dotenv": "^17.2.4" + }, + "pkg": { + "assets": [ + "node_modules/@modelcontextprotocol/**/*" + ], + "targets": ["node18-win-x64"], + "outputPath": "dist" + } +} diff --git a/queries api.php b/queries api.php new file mode 100644 index 0000000..66c8804 --- /dev/null +++ b/queries api.php @@ -0,0 +1,228 @@ + 1000) // SI DELTA OK POUR REFRESH, REFRESH SINON DEMANDER NOUVEAU TOKEN ET RECOPIER DANS INDEX.PHP !!!!!!!!!!!!!!!!!! + { + $ch = curl_init(); + + if($delta < 1190) + $post_data="grant_type=refresh_token&refresh_token=".$_SESSION['refresh_token']; + else + $post_data="grant_type=password&tenant_code=".$_SESSION['tenant']."&username=".$_SESSION['user']."&password=".$_SESSION['pass']; + + + curl_setopt($ch, CURLOPT_URL, "https://".$_SESSION['ip']."/EasySTS/OAuth/Token"); + curl_setopt($ch, CURLOPT_POST, TRUE); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded' , 'Authorization: Basic R05BOklFNGU3aXFoZHQ=')); + curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); + + $data = curl_exec($ch); + $tab = json_decode($data, true); + + if(!empty($tab)) + { + + if(isset($tab["refresh_token"])) + { + $refresh_token = $tab["refresh_token"]; + $token = $tab["access_token"]; + } + else + { + if ( ($tab["error"] == "") or empty($tab["error"]) ) + $error = "inconnue"; + else + $error = $tab["error"]; + header('Location: login.php?fail=true&desc='.urlencode($error)); + exit(); + } + + if(!empty($refresh_token)) + { + $_SESSION['refresh_token'] = $refresh_token; + $_SESSION['token'] = $token; + $_SESSION['token_start_time'] = time(); + + } + } + } +} + +// --- DELETE --- // + +$ch = curl_init(); + +if ($_GET["delete"] == "true") { + +$action = $_GET['action']; + //sleep(2); + +// Préparation query + +$type = $_GET['type']; + + if ($type == "Containers") { + $component = "ComponentId"; + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.ContainerRemoveCommand"; + } + + if ($type == "Stocks") { + $component = "StockId"; + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.Contracts.Commands.StockRemoveCommand"; + } + + if ($type == "ProductLocations") { + $component = "ProductLocationId"; + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.Expeditions.Contracts.Commands.ProductLocationRemoveCommand"; + } + + if ($type== "Tasks") { + $component = "TaskId"; + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.Contracts.Commands.TaskRemoveCommand"; + } + + if ($type== "Products") { + $component = "ProductId"; + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.ProductRemoveCommand"; + } + + if ($type== "Accounts") { + $component = "AccountId"; + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.AccountRemoveCommand"; + } + + if ($type== "Suppliers") { + $component = "SupplierId"; + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.SupplierRemoveCommand"; + } + + if ($type== "Kits") { + $component = "KitId"; + if($action == 1) + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.KitDeleteCommand"; + if($action == 5) + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.KitDisableCommand"; + } + + if ($type== "Aliases") { + $component = "AliasId"; + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.AliasRemoveCommand"; + } + + if ($type== "InboundOrders") { + $component = "InboundOrderId"; + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.Receptions.Contracts.Commands.InboundOrderCancelCommandV2"; + + } + + if ($type== "Receptions") { + $component = "ReceptionId"; + if($action == 1) + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.Receptions.Contracts.Commands.ReceptionCancelCommandV2"; + if($action == 2) + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.Receptions.Contracts.Commands.ReceptionClosingCommandV2"; + if($action == 3) + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.Receptions.Contracts.Commands.ReceptionRemoveCommand"; + } + + if ($type== "OutboundOrders") { + $component = "OutboundOrderId"; + if($action == 1) + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.Expeditions.Contracts.Commands.OutboundOrderCancelCommand"; + if($action == 2) + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.Expeditions.Contracts.Commands.OutboundOrderForceCloseCommand"; + if($action == 3) + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.Expeditions.Contracts.Commands.OutboundOrderArchiveCommand"; + if($action == 4) + $cmd_name = "Mecalux.ITSW.EasyWMS.Modules.Expeditions.Contracts.Commands.OutboundOrderUnsetCurrentOperationCommand"; + } + + + +// Récupérer id + + $query = '{ + "Application": "EasyWMS", + "QueryType": 1, + "Expression" : "Context.'.$type.'.Select(z => z.Id)" + }'; + + + token_refresh(); + + + curl_setopt($ch, CURLOPT_URL, "https://".$_SESSION['ip']."/ApplicationService/api/QueryExecute" + ); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($ch, CURLOPT_HTTPHEADER, [ + "Content-Type: application/json", + "Authorization: Bearer " . $_SESSION["token"], + ]); + + curl_setopt($ch, CURLOPT_POSTFIELDS, $query); + + $data = curl_exec($ch); + $tab_data = json_decode($data, true); + // echo($tab_data['Table']['Rows'][0]['Values']['Column']); + + +// Commande Delete en boucle + + curl_setopt( + $ch, CURLOPT_URL, "https://".$_SESSION['ip']."/ApplicationService/api/CommandExecute" + ); + token_refresh(); + + foreach ($tab_data["Table"]["Rows"] as $key => $value) { + + //echo $value["Values"]["Column"]."
"; + $cmd_delete = + '[{ + "Name": "'.$cmd_name.', Mecalux.ITSW.EasyWMS.Modules.Contracts", + "Properties": { + "'.$component.'": "' . + $value["Values"]["Column"] . + '", + "ForceDeletionOfEmptyHolderContainer": true + } + }]'; + //echo "value : ".$value["Values"]["Column"]; + curl_setopt($ch, CURLOPT_POSTFIELDS, $cmd_delete); + + $data_delete = curl_exec($ch); + $logs[] = $data_delete; + if($logs) + { + foreach ($logs as $key => $value) { + $pos1 = strpos($logs[$key], '"Message":"'); + $msg = $logs[$key]; + if (!empty($pos1)) + { + $msg = substr($logs[$key], $pos1+11); + $pos2 = strpos($msg, '","'); + $msg = substr($msg, 0, $pos2)."\n"; + echo $msg; + + } + } + echo($erreurs); + } + } +} +?> \ No newline at end of file diff --git a/src/config/constants.js b/src/config/constants.js new file mode 100644 index 0000000..7aa7740 --- /dev/null +++ b/src/config/constants.js @@ -0,0 +1,83 @@ +/** + * Constants for WMS MCP Server + */ + +// WMS Entity Types available via Query API +// Based on queries api.php reference +const WMS_ENTITY_TYPES = [ + // Master Data + 'Products', + 'Containers', + 'Accounts', + 'Suppliers', + 'Kits', + 'Aliases', + + // Operations + 'Tasks', + 'Stocks', + 'ProductLocations', + + // Inbound + 'InboundOrders', + 'Receptions', + + // Outbound + 'OutboundOrders' +]; + +// Entity Categories for documentation +const ENTITY_CATEGORIES = { + 'Master Data': ['Products', 'Containers', 'Accounts', 'Suppliers', 'Kits', 'Aliases'], + 'Operations': ['Tasks', 'Stocks', 'ProductLocations'], + 'Inbound': ['InboundOrders', 'Receptions'], + 'Outbound': ['OutboundOrders'] +}; + +// Common WMS Commands +// These can be used with call_command_api tool +const WMS_COMMANDS = { + 'ProductRemove': 'Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.ProductRemoveCommand', + 'ProductUpdate': 'Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.ProductUpdateCommand', + 'ContainerCreate': 'Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.ContainerCreateCommand', + 'TaskCancel': 'Mecalux.ITSW.EasyWMS.Modules.Tasks.Contracts.Commands.TaskCancelCommand' + // Add more as needed +}; + +// MCP Resource URIs +const RESOURCE_URIS = { + WMS_ENTITIES: 'wms://entities', + ENTITY_SCHEMAS: 'wms://entity-schemas', + QUERY_EXAMPLES: 'wms://query-examples', + WORKFLOWS_OVERVIEW: 'workflows://overview', + WORKFLOWS_CATEGORIES: 'workflows://categories', + API_CATALOG: 'api://catalog', + LOGS_GUIDE: 'logs://guide' +}; + +// Log patterns for error detection +const LOG_ERROR_PATTERNS = [ + 'ERROR', + 'EXCEPTION', + 'FATAL', + 'CRITICAL', + 'FAILED', + 'FAILURE', + 'WARNING' +]; + +// Query limits +const QUERY_LIMITS = { + MAX_ROWS: parseInt(process.env.MAX_QUERY_ROWS) || 1000, + DEFAULT_LIMIT: 100, + TIMEOUT_MS: parseInt(process.env.QUERY_TIMEOUT) || 30000 +}; + +module.exports = { + WMS_ENTITY_TYPES, + ENTITY_CATEGORIES, + WMS_COMMANDS, + RESOURCE_URIS, + LOG_ERROR_PATTERNS, + QUERY_LIMITS +}; diff --git a/src/config/profile-manager.js b/src/config/profile-manager.js new file mode 100644 index 0000000..2dd49f4 --- /dev/null +++ b/src/config/profile-manager.js @@ -0,0 +1,167 @@ +/** + * Profile Manager + * Handles multiple WMS profiles (AD, LIMAGRAIN, ...) defined in .env. + * + * Shared settings (same for all profiles): + * - WMS_API_AUTH OAuth client Basic auth header + * - WMS_APPLICATION Application name (e.g. "EasyWMS") + * - WMS_API_PATH URL path to the ApplicationService API + * - WMS_TOKEN_PATH URL path to the OAuth token endpoint + * - WORKFLOW_API_PATH URL path to the AD API + * + * Per-profile settings (prefixed by profile name): + * - _HOST Hostname or IP (e.g. "10.255.255.2", "p4swms.mss.mecalux.com") + * - _USERNAME + * - _PASSWORD + * - _TENANT + * - _SAAS "true" | "false" (default false). When true the WMS is + * cloud-hosted — local filesystem logs are not reachable, + * so log tools return an error instead of probing paths. + * + * Profile registry: + * - WMS_PROFILES Comma-separated list of profile names (e.g. "AD,LIMAGRAIN") + * - DEFAULT_WMS_PROFILE Profile activated at startup (optional) + */ + +const DEFAULTS = { + apiPath: '/ApplicationService/api', + tokenPath: '/EasySTS/OAuth/Token', + workflowApiPath: '/AD/api', + application: 'EasyWMS', + protocol: 'https', +}; + +const listeners = []; +let profiles = {}; +let currentProfileName = null; + +/** + * Parse .env into an in-memory profile registry. + * Called once at startup; safe to call again after env changes (tests). + */ +function loadProfiles() { + profiles = {}; + currentProfileName = null; + + const names = (process.env.WMS_PROFILES || '') + .split(',') + .map(s => s.trim()) + .filter(Boolean); + + if (names.length === 0) { + console.error('[Profile] WARNING: WMS_PROFILES is empty — no profiles loaded'); + return; + } + + const shared = { + auth: process.env.WMS_API_AUTH, + application: process.env.WMS_APPLICATION || DEFAULTS.application, + apiPath: process.env.WMS_API_PATH || DEFAULTS.apiPath, + tokenPath: process.env.WMS_TOKEN_PATH || DEFAULTS.tokenPath, + workflowApiPath: process.env.WORKFLOW_API_PATH || DEFAULTS.workflowApiPath, + }; + + for (const name of names) { + const host = process.env[`${name}_HOST`]; + const username = process.env[`${name}_USERNAME`]; + const password = process.env[`${name}_PASSWORD`]; + const tenant = process.env[`${name}_TENANT`]; + const saasRaw = process.env[`${name}_SAAS`]; + const saas = saasRaw != null && /^(true|1|yes)$/i.test(saasRaw.trim()); + + if (!host || !username || !password || !tenant) { + console.error(`[Profile] WARNING: profile "${name}" is incomplete (missing HOST/USERNAME/PASSWORD/TENANT) — skipped`); + continue; + } + + const base = `${DEFAULTS.protocol}://${host}`; + profiles[name] = { + name, + host, + username, + password, + tenant, + saas, + auth: shared.auth, + application: shared.application, + apiBaseUrl: `${base}${shared.apiPath}`, + tokenUrl: `${base}${shared.tokenPath}`, + workflowApiBase: `${base}${shared.workflowApiPath}`, + }; + } + + const defaultName = process.env.DEFAULT_WMS_PROFILE; + if (defaultName && profiles[defaultName]) { + currentProfileName = defaultName; + console.error(`[Profile] Loaded ${Object.keys(profiles).length} profile(s). Active: ${currentProfileName}`); + } else if (defaultName) { + console.error(`[Profile] DEFAULT_WMS_PROFILE="${defaultName}" is not a valid profile — no profile active`); + } else { + console.error(`[Profile] Loaded ${Object.keys(profiles).length} profile(s). No default selected — Claude must call switch_wms_profile before any API call`); + } +} + +function listProfiles() { + return Object.keys(profiles).sort(); +} + +function getCurrentName() { + return currentProfileName; +} + +/** + * Return the active profile config. Throws a helpful error if none is selected, + * so tool responses tell Claude exactly what to do next. + */ +function getCurrent() { + if (!currentProfileName) { + const available = listProfiles(); + const hint = available.length > 0 + ? `Available profiles: ${available.join(', ')}. Call switch_wms_profile with one of them.` + : 'No profiles configured in .env (WMS_PROFILES is empty).'; + throw new Error(`No WMS profile selected. ${hint}`); + } + return profiles[currentProfileName]; +} + +/** + * Switch to a different profile. Notifies listeners (services) so they can + * reset token + invalidate caches tied to the previous profile. + */ +function switchTo(name) { + if (!profiles[name]) { + const available = listProfiles(); + throw new Error(`Unknown profile "${name}". Available: ${available.join(', ') || '(none)'}`); + } + if (name === currentProfileName) { + return profiles[name]; + } + const previous = currentProfileName; + currentProfileName = name; + console.error(`[Profile] Switched: ${previous || '(none)'} → ${name}`); + for (const listener of listeners) { + try { + listener({ previous, current: name }); + } catch (err) { + console.error(`[Profile] Listener error: ${err.message}`); + } + } + return profiles[name]; +} + +/** + * Register a callback fired whenever the active profile changes. + * Used by services to invalidate caches / reset tokens. + */ +function onSwitch(listener) { + listeners.push(listener); +} + +module.exports = { + loadProfiles, + listProfiles, + getCurrent, + getCurrentName, + switchTo, + onSwitch, +}; diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..91c70c1 --- /dev/null +++ b/src/index.js @@ -0,0 +1,283 @@ +#!/usr/bin/env node + +/** + * WMS MCP Server + * Main entry point for the Model Context Protocol server + * + * Architecture: 100% API-based (no direct database access) + * Data Access: All data retrieved via WMS REST APIs + */ + +const path = require('path'); + +// Silence dotenv output to stdout (MCP requires stdout for JSON only) +const originalStdoutWrite = process.stdout.write; +process.stdout.write = process.stderr.write.bind(process.stderr); + +require('dotenv').config({ + path: path.join(__dirname, '..', '.env') +}); + +// Restore stdout +process.stdout.write = originalStdoutWrite; + +// Load WMS profiles from .env before any service is instantiated. +// Services register onSwitch listeners at module load, so they must see +// profile-manager in its final state — but since loadProfiles() mutates +// the manager's internal state, it's safe to call it after requires too. +const profileManager = require('./config/profile-manager'); +profileManager.loadProfiles(); + +const { Server } = require('@modelcontextprotocol/sdk/server/index.js'); +const { StdioServerTransport } = require('@modelcontextprotocol/sdk/server/stdio.js'); +const { + CallToolRequestSchema, + ListToolsRequestSchema, + ListResourcesRequestSchema, + ReadResourceRequestSchema, +} = require('@modelcontextprotocol/sdk/types.js'); + +// Import resources +const wmsEntitiesResources = require('./resources/wms-entities.js'); +const entitySchemasResources = require('./resources/entity-schemas.js'); +const queryExamplesResources = require('./resources/query-examples.js'); +const workflowsResources = require('./resources/workflows.js'); +const apisResources = require('./resources/apis.js'); +const logsResources = require('./resources/logs.js'); + +// Import tools +const workflowTools = require('./tools/workflow-tools.js'); +const wmsQueryTools = require('./tools/wms-query-tools.js'); +const apiTools = require('./tools/api-tools.js'); +const logTools = require('./tools/log-tools.js'); +const adTools = require('./tools/ad-tools.js'); +const metadataTools = require('./tools/metadata-tools.js'); +const configTools = require('./tools/config-tools.js'); +const profileTools = require('./tools/profile-tools.js'); + +// Create MCP Server +const server = new Server( + { + name: 'wms-mcp-server', + version: '1.0.0', + }, + { + capabilities: { + resources: {}, + tools: {}, + }, + } +); + +/** + * Handler: resources/list + * List all available resources + */ +server.setRequestHandler(ListResourcesRequestSchema, async () => { + const allResources = [ + ...wmsEntitiesResources.listResources(), + ...entitySchemasResources.listResources(), + ...queryExamplesResources.listResources(), + ...workflowsResources.listResources(), + ...apisResources.listResources(), + ...logsResources.listResources(), + ]; + + return { + resources: allResources, + }; +}); + +/** + * Handler: resources/read + * Read a specific resource + */ +server.setRequestHandler(ReadResourceRequestSchema, async (request) => { + const { uri } = request.params; + + try { + // Route to the appropriate handler based on URI + if (uri.startsWith('wms://entities')) { + return await wmsEntitiesResources.readResource(uri); + } else if (uri.startsWith('wms://entity-schemas')) { + return await entitySchemasResources.readResource(uri); + } else if (uri.startsWith('wms://query-examples')) { + return await queryExamplesResources.readResource(uri); + } else if (uri.startsWith('workflows://')) { + return await workflowsResources.readResource(uri); + } else if (uri.startsWith('api://')) { + return await apisResources.readResource(uri); + } else if (uri.startsWith('logs://')) { + return await logsResources.readResource(uri); + } else { + throw new Error(`Unknown resource URI: ${uri}`); + } + } catch (error) { + console.error(`[Server] Error reading resource ${uri}:`, error.message); + return { + contents: [ + { + uri, + mimeType: 'text/plain', + text: `Error reading resource: ${error.message}`, + }, + ], + }; + } +}); + +/** + * Handler: tools/list + * List all available tools + */ +server.setRequestHandler(ListToolsRequestSchema, async () => { + const allTools = [ + ...workflowTools.listTools(), + ...wmsQueryTools.listTools(), + ...apiTools.listTools(), + ...logTools.listTools(), + ...adTools.listTools(), + ...metadataTools.listTools(), + ...configTools.listTools(), + ...profileTools.listTools(), + ]; + + return { + tools: allTools, + }; +}); + +/** + * Handler: tools/call + * Execute a specific tool + */ +server.setRequestHandler(CallToolRequestSchema, async (request) => { + const { name, arguments: args } = request.params; + + try { + console.error(`[Server] Executing tool: ${name}`); + + // Route to the appropriate handler based on tool name + if (name.startsWith('search_workflows') || + name.startsWith('get_workflow_') || + name.startsWith('list_workflow_')) { + return await workflowTools.executeTool(name, args); + } else if (name.startsWith('query_wms_') || + name.startsWith('count_wms_') || + name.startsWith('get_entity_') || + name.startsWith('search_wms_')) { + return await wmsQueryTools.executeTool(name, args); + } else if (name.startsWith('call_query_api') || + name.startsWith('execute_command')) { + return await apiTools.executeTool(name, args); + } else if (name.includes('_logs')) { + return await logTools.executeTool(name, args); + } else if (name.startsWith('get_application_') || + name.startsWith('get_ad_') || + name.startsWith('search_ad_') || + name.startsWith('list_ad_')) { + return await adTools.executeTool(name, args); + } else if (name === 'get_entity_metadata' || name === 'generic_search') { + return await metadataTools.executeTool(name, args); + } else if (name === 'get_system_parameters') { + return await configTools.executeTool(name, args); + } else if (name === 'list_wms_profiles' || + name === 'get_current_wms_profile' || + name === 'switch_wms_profile') { + return await profileTools.executeTool(name, args); + } else { + throw new Error(`Unknown tool: ${name}`); + } + } catch (error) { + console.error(`[Server] Error executing tool ${name}:`, error.message); + return { + content: [ + { + type: 'text', + text: JSON.stringify( + { + success: false, + error: error.message, + tool: name, + }, + null, + 2 + ), + }, + ], + isError: true, + }; + } +}); + +/** + * Start the server + */ +async function main() { + try { + console.error('[Server] Starting WMS MCP Server...'); + console.error('[Server] Architecture: 100% API-based (no direct database access)'); + + // Validate shared environment variables + const requiredSharedEnvVars = ['WMS_API_AUTH', 'WMS_PROFILES']; + const missingShared = requiredSharedEnvVars.filter(v => !process.env[v]); + if (missingShared.length > 0) { + console.error('[Server] WARNING: Missing shared env vars:', missingShared.join(', ')); + } + + // Validate that at least one profile is loaded + const profiles = profileManager.listProfiles(); + if (profiles.length === 0) { + console.error('[Server] WARNING: No WMS profile loaded. Define WMS_PROFILES + _HOST/USERNAME/PASSWORD/TENANT in .env'); + } else { + console.error(`[Server] Profiles available: ${profiles.join(', ')}`); + const current = profileManager.getCurrentName(); + if (current) { + console.error(`[Server] Active profile: ${current}`); + } else { + console.error('[Server] No active profile — Claude must call switch_wms_profile before any API call'); + } + } + + // Create stdio transport + const transport = new StdioServerTransport(); + + // Connect server + await server.connect(transport); + + console.error('[Server] WMS MCP Server running on stdio'); + console.error('[Server] Server name: wms-mcp-server'); + console.error('[Server] Version: 1.0.0'); + console.error('[Server] Ready to accept requests from Claude Desktop'); + } catch (error) { + console.error('[Server] Fatal error starting server:', error.message); + process.exit(1); + } +} + +/** + * Handle graceful shutdown + */ +process.on('SIGINT', async () => { + console.error('\n[Server] Shutting down WMS MCP Server (SIGINT)...'); + process.exit(0); +}); + +process.on('SIGTERM', async () => { + console.error('\n[Server] Shutting down WMS MCP Server (SIGTERM)...'); + process.exit(0); +}); + +// Handle uncaught errors +process.on('uncaughtException', (error) => { + console.error('[Server] Uncaught exception:', error.message); + console.error(error.stack); +}); + +process.on('unhandledRejection', (reason, promise) => { + console.error('[Server] Unhandled rejection at:', promise); + console.error('[Server] Reason:', reason); +}); + +// Start the server +main(); diff --git a/src/resources/apis.js b/src/resources/apis.js new file mode 100644 index 0000000..db6f702 --- /dev/null +++ b/src/resources/apis.js @@ -0,0 +1,266 @@ +/** + * API Resources + * Provides catalog of WMS APIs available + */ + +function listResources() { + return [ + { + uri: 'api://catalog', + name: 'API Catalog', + description: 'Catalog of WMS APIs available with parameters and documentation', + mimeType: 'text/markdown', + }, + ]; +} + +async function readResource(uri) { + let content; + + switch (uri) { + case 'api://catalog': + content = getAPICatalog(); + break; + + default: + throw new Error(`Unknown API resource: ${uri}`); + } + + return { + contents: [{ + uri, + mimeType: 'text/markdown', + text: content, + }], + }; +} + +function getAPICatalog() { + return `# WMS API Catalog + +## Overview + +The WMS provides several REST APIs for querying and modifying data. + +**Base URL:** \`${process.env.WMS_API_BASE_URL || 'https://10.255.255.2/ApplicationService/api'}\` +**Authentication:** OAuth 2.0 Bearer Token (automatic) + +--- + +## Query API + +Execute LINQ queries against WMS entities. + +**Endpoint:** \`/api/QueryExecute\` +**Method:** POST +**Authentication:** Required + +### Request Format + +\`\`\`json +{ + "Application": "EasyWMS", + "QueryType": 1, + "Expression": "Context.{EntityType}.Select(z => z)" +} +\`\`\` + +### Supported Entity Types + +| Entity Type | Description | +|-------------|-------------| +| Products | Product references and SKUs | +| Containers | Pallets, boxes, and container types | +| Stocks | Available inventory by location | +| ProductLocations | Product placement in warehouse | +| Tasks | WMS tasks (picks, puts, moves, etc.) | +| Accounts | Customer accounts | +| Suppliers | Supplier information | +| Kits | Product kits and bundles | +| Aliases | Product aliases and alternative codes | +| InboundOrders | Inbound/receiving orders | +| Receptions | Actual receptions | +| OutboundOrders | Outbound/shipping orders | + +### Example Queries + +\`\`\` +# Get all products (limited) +Context.Products.Take(100).Select(z => z) + +# Get specific fields +Context.Products.Select(z => new { z.Id, z.Code, z.Name }) + +# Filter and select +Context.Tasks.Where(z => z.Status == "Pending").Take(50).Select(z => z) +\`\`\` + +### MCP Tool + +Use \`call_query_api\` tool to execute queries. + +--- + +## Command API + +Execute commands to modify WMS data. + +**Endpoint:** \`/api/CommandExecute\` +**Method:** POST +**Authentication:** Required + +### Request Format + +\`\`\`json +[ + { + "Name": "CommandName, Mecalux.ITSW.EasyWMS.Modules.Contracts", + "Properties": { + "PropertyName": "value" + } + } +] +\`\`\` + +### Common Commands + +| Command | Description | +|---------|-------------| +| ProductRemoveCommand | Remove a product | +| ProductUpdateCommand | Update product information | +| ContainerCreateCommand | Create a new container | +| TaskCancelCommand | Cancel a task | +| InboundOrderCancelCommandV2 | Cancel an inbound order | +| OutboundOrderCancelCommand | Cancel an outbound order | + +### Example Command + +\`\`\`json +[ + { + "Name": "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.ProductRemoveCommand, Mecalux.ITSW.EasyWMS.Modules.Contracts", + "Properties": { + "Id": "product-guid-here" + } + } +] +\`\`\` + +### MCP Tool + +Use \`execute_command\` tool to execute commands. + +**⚠️ WARNING:** Commands modify data. Use with caution. + +--- + +## Workflow API + +Retrieve workflow definitions by application. + +**Endpoint:** \`/AD/api/Workflow/GetByApplication\` +**Method:** POST +**Authentication:** Required + +### Request Format + +\`\`\`json +["EasyWMS", "AD", 5000, 0] +\`\`\` + +Parameters: +1. Application name (e.g., "EasyWMS") +2. Tenant code (e.g., "AD") +3. Page size (e.g., 5000) +4. Offset (e.g., 0 for first page) + +### Response + +Array of workflow objects with: +- Id, Code, Name +- Category, Description +- Version, Status +- Created, Modified +- Definition (JSON) + +### MCP Tools + +Use workflow tools to interact with workflows: +- \`search_workflows\` - Search by name, code, description +- \`get_workflow_details\` - Get full workflow definition +- \`list_workflow_categories\` - List all categories + +--- + +## Authentication + +All APIs use OAuth 2.0 authentication. + +**Token Endpoint:** \`/EasySTS/OAuth/Token\` +**Grant Types:** password, refresh_token + +### Token Management + +- Tokens expire after ~1200 seconds +- Automatic refresh when < 1000 seconds remaining +- Credentials configured in .env file + +The MCP server handles authentication automatically. + +--- + +## Error Handling + +### HTTP Status Codes + +- \`200\` - Success +- \`400\` - Bad request (invalid query/command) +- \`401\` - Unauthorized (token expired or invalid) +- \`403\` - Forbidden (insufficient permissions) +- \`500\` - Internal server error + +### Error Response Format + +\`\`\`json +{ + "error": "Error message", + "details": "Detailed error information" +} +\`\`\` + +--- + +## Rate Limits and Constraints + +- **Query Limit:** Maximum 1000 rows per query (configurable) +- **Query Timeout:** 30 seconds (configurable) +- **Workflow Cache:** 1 hour TTL (configurable) + +--- + +## Configuration + +API settings are configured via environment variables: + +\`\`\`env +WMS_API_BASE_URL=https://10.255.255.2/ApplicationService/api +WMS_API_TOKEN_URL=https://10.255.255.2/EasySTS/OAuth/Token +WMS_API_TENANT=AD +WMS_API_USERNAME=your-username +WMS_API_PASSWORD=your-password +WORKFLOW_API_BASE=https://10.255.255.2/AD/api +WORKFLOW_PAGE_SIZE=5000 +MAX_QUERY_ROWS=1000 +QUERY_TIMEOUT=30000 +\`\`\` + +--- + +**Note:** Use MCP tools to interact with these APIs. Direct API calls require proper authentication handling. +`; +} + +module.exports = { + listResources, + readResource, +}; diff --git a/src/resources/documentation.js b/src/resources/documentation.js new file mode 100644 index 0000000..a83adde --- /dev/null +++ b/src/resources/documentation.js @@ -0,0 +1,193 @@ +const fs = require('fs').promises; +const path = require('path'); + +/** + * Resources MCP pour la documentation + * Permet à Claude d'accéder à la documentation structurée en fichiers Markdown + */ + +// Chemin vers le dossier de documentation +const DOCS_PATH = process.env.DOCS_PATH || path.join(__dirname, '..', '..', 'docs'); + +/** + * Scanne récursivement un dossier pour trouver tous les fichiers .md + * @param {string} dir - Dossier à scanner + * @param {string} baseDir - Dossier de base pour les chemins relatifs + * @returns {Promise} - Liste des fichiers .md + */ +async function scanMarkdownFiles(dir, baseDir = dir) { + let files = []; + + try { + const entries = await fs.readdir(dir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + + if (entry.isDirectory()) { + // Récursion dans les sous-dossiers + const subFiles = await scanMarkdownFiles(fullPath, baseDir); + files = files.concat(subFiles); + } else if (entry.isFile() && entry.name.endsWith('.md')) { + // Fichier Markdown trouvé + const relativePath = path.relative(baseDir, fullPath); + files.push({ + name: entry.name, + path: fullPath, + relativePath: relativePath.replace(/\\/g, '/'), // Normaliser les slashes + uri: `docs://${relativePath.replace(/\\/g, '/')}`, + }); + } + } + } catch (err) { + // Dossier n'existe pas ou erreur de lecture + console.error(`Error scanning directory ${dir}:`, err.message); + } + + return files; +} + +/** + * Liste les resources disponibles pour la documentation + * @returns {Promise} - Liste des resources + */ +async function listResources() { + try { + // Scanner les fichiers Markdown + const mdFiles = await scanMarkdownFiles(DOCS_PATH); + + const resources = [ + { + uri: 'docs://index', + name: 'Documentation Index', + description: 'Sommaire de toute la documentation disponible', + mimeType: 'text/markdown', + }, + ]; + + // Ajouter chaque fichier .md comme resource + mdFiles.forEach((file) => { + resources.push({ + uri: file.uri, + name: file.name.replace('.md', ''), + description: `Documentation: ${file.relativePath}`, + mimeType: 'text/markdown', + }); + }); + + return resources; + } catch (err) { + console.error('Error listing documentation resources:', err); + return [ + { + uri: 'docs://index', + name: 'Documentation Index', + description: 'Sommaire de toute la documentation disponible', + mimeType: 'text/markdown', + }, + ]; + } +} + +/** + * Génère un index/sommaire de la documentation + * @returns {Promise} - Markdown avec le sommaire + */ +async function generateIndex() { + try { + const mdFiles = await scanMarkdownFiles(DOCS_PATH); + + if (mdFiles.length === 0) { + return `# Documentation\n\n*Aucun fichier de documentation trouvé dans \`${DOCS_PATH}\`*\n\n` + + `Pour ajouter de la documentation :\n` + + `1. Créez un dossier \`docs\` à la racine du projet\n` + + `2. Ajoutez vos fichiers .md (organisation libre avec sous-dossiers)\n` + + `3. Redémarrez le serveur MCP\n`; + } + + let markdown = '# Documentation WMS\n\n'; + markdown += `**${mdFiles.length} fichiers de documentation disponibles**\n\n`; + markdown += `📁 Emplacement : \`${DOCS_PATH}\`\n\n`; + + // Grouper par dossier + const grouped = {}; + mdFiles.forEach((file) => { + const dir = path.dirname(file.relativePath); + const folder = dir === '.' ? '📄 Racine' : `📁 ${dir}`; + + if (!grouped[folder]) { + grouped[folder] = []; + } + grouped[folder].push(file); + }); + + // Générer le sommaire + markdown += '## Sommaire\n\n'; + + Object.keys(grouped).sort().forEach((folder) => { + markdown += `### ${folder}\n\n`; + + grouped[folder].forEach((file) => { + markdown += `- **${file.name.replace('.md', '')}** - \`${file.uri}\`\n`; + }); + + markdown += '\n'; + }); + + markdown += '---\n\n'; + markdown += '*Pour lire un fichier, demandez à Claude de lire la resource correspondante (par exemple: "Lis la documentation X")*\n'; + + return markdown; + } catch (err) { + return `# Erreur\n\nImpossible de générer l'index de documentation: ${err.message}`; + } +} + +/** + * Lit un fichier de documentation + * @param {string} relativePath - Chemin relatif du fichier + * @returns {Promise} - Contenu Markdown du fichier + */ +async function readDocFile(relativePath) { + try { + const filePath = path.join(DOCS_PATH, relativePath); + const content = await fs.readFile(filePath, 'utf8'); + return content; + } catch (err) { + return `# Erreur\n\nImpossible de lire le fichier \`${relativePath}\`: ${err.message}`; + } +} + +/** + * Lit une resource documentation selon son URI + * @param {string} uri - URI de la resource (format: docs://path/to/file.md) + * @returns {Promise} - Contenu de la resource + */ +async function readResource(uri) { + let content; + + if (uri === 'docs://index') { + content = await generateIndex(); + } else if (uri.startsWith('docs://')) { + // Extraire le chemin relatif de l'URI + const relativePath = uri.replace('docs://', ''); + content = await readDocFile(relativePath); + } else { + throw new Error(`Unknown documentation resource: ${uri}`); + } + + return { + contents: [ + { + uri, + mimeType: 'text/markdown', + text: content, + }, + ], + }; +} + +module.exports = { + listResources, + readResource, +}; diff --git a/src/resources/entity-schemas.js b/src/resources/entity-schemas.js new file mode 100644 index 0000000..1c11274 --- /dev/null +++ b/src/resources/entity-schemas.js @@ -0,0 +1,156 @@ +/** + * Entity Schema Resources + * Provides schema information for WMS entity types + */ + +function listResources() { + return [ + { + uri: 'wms://entity-schemas', + name: 'Entity Schemas', + description: 'Schema information and common fields for WMS entities', + mimeType: 'text/markdown', + }, + ]; +} + +async function readResource(uri) { + let content; + + switch (uri) { + case 'wms://entity-schemas': + content = getEntitySchemas(); + break; + + default: + throw new Error(`Unknown entity schema resource: ${uri}`); + } + + return { + contents: [{ + uri, + mimeType: 'text/markdown', + text: content, + }], + }; +} + +function getEntitySchemas() { + return `# WMS Entity Schemas + +## Overview + +Entity schemas define the structure and available fields for each entity type. +Use the \`get_entity_schema\` tool to retrieve the actual schema from the API by querying one entity. + +## Common Field Patterns + +Most WMS entities follow these patterns: + +### Standard Fields +- \`Id\` - Unique identifier (GUID or integer) +- \`Code\` - Business code/reference +- \`Name\` - Display name +- \`Description\` - Detailed description +- \`Created\` - Creation timestamp +- \`Modified\` - Last modification timestamp +- \`Status\` - Entity status + +### Relationship Fields +- \`{Entity}Id\` - Foreign key to related entity (e.g., ProductId, AccountId) +- \`{Entity}Code\` - Related entity code +- \`{Entity}Name\` - Related entity name + +## Entity-Specific Schemas + +### Products +Common fields: +- Id, Code, Name, Description +- Category, Family, SubFamily +- Weight, Volume, Height, Width, Length +- UnitOfMeasure, BaseUnit +- Barcode, AlternativeCodes +- Active, Blocked + +### Containers +Common fields: +- Id, Code, Name, Type +- Status, Location, Zone +- Weight, Tare, MaxWeight +- ProductId, Quantity +- Created, Modified + +### Tasks +Common fields: +- Id, Code, Type, Status +- Priority, Sequence +- SourceLocation, TargetLocation +- ProductId, Quantity +- AssignedUser, AssignedDevice +- StartedAt, CompletedAt + +### Stocks +Common fields: +- ProductId, ProductCode, ProductName +- LocationId, LocationCode +- Quantity, AvailableQuantity, ReservedQuantity +- UnitOfMeasure +- LotNumber, SerialNumber +- ExpirationDate + +### InboundOrders / OutboundOrders +Common fields: +- Id, Code, ExternalCode +- Type, Status, Priority +- AccountId, AccountCode, AccountName +- SupplierId, SupplierCode (inbound only) +- ExpectedDate, PlannedDate, ActualDate +- TotalLines, TotalQuantity +- Created, Modified + +## Retrieving Schemas + +Use the \`get_entity_schema\` tool to dynamically retrieve the schema: + +\`\`\` +# Get Products schema +get_entity_schema(entity_type="Products") + +# Get Tasks schema +get_entity_schema(entity_type="Tasks") +\`\`\` + +This will query one entity from the API and return all available fields with sample values. + +## LINQ Field Selection + +You can select specific fields using LINQ expressions: + +\`\`\` +# Select specific fields +query_wms_entities( + entity_type="Products", + select_expression="z => new { z.Id, z.Code, z.Name, z.Category }" +) + +# Nested object creation +query_wms_entities( + entity_type="Tasks", + select_expression="z => new { + Task = z.Code, + Product = z.ProductName, + Status = z.Status + }" +) +\`\`\` + +--- + +**Note:** Field availability may vary depending on WMS configuration and version. +`; +} + +module.exports = { + listResources, + readResource, +}; diff --git a/src/resources/logs.js b/src/resources/logs.js new file mode 100644 index 0000000..ffdbbb4 --- /dev/null +++ b/src/resources/logs.js @@ -0,0 +1,295 @@ +/** + * Logs Resources + * Provides guide for WMS log files + */ + +function listResources() { + return [ + { + uri: 'logs://guide', + name: 'Logs Guide', + description: 'Guide for WMS log files: formats, locations, common error patterns', + mimeType: 'text/markdown', + }, + ]; +} + +async function readResource(uri) { + let content; + + switch (uri) { + case 'logs://guide': + content = getLogsGuide(); + break; + + default: + throw new Error(`Unknown logs resource: ${uri}`); + } + + return { + contents: [{ + uri, + mimeType: 'text/markdown', + text: content, + }], + }; +} + +function getLogsGuide() { + return `# WMS Logs Guide + +## Log File Locations + +**Primary Logs:** \`${process.env.LOGS_PATH || 'C:\\inetpub\\logs\\LogFiles\\Mecalux'}\` + +Log files are typically named with date patterns: +- \`application_YYYYMMDD.log\` +- \`error_YYYYMMDD.log\` +- \`api_YYYYMMDD.log\` + +--- + +## Log File Format + +WMS logs typically follow this format: + +\`\`\` +[YYYY-MM-DD HH:MM:SS.fff] [LEVEL] [Module] Message +Additional context or stack trace (if applicable) +\`\`\` + +### Example Log Entries + +\`\`\` +[2024-01-15 10:23:45.123] [INFO] [TaskService] Task TASK-001 created successfully +[2024-01-15 10:23:46.456] [ERROR] [StockService] Insufficient stock for product PROD-123 +[2024-01-15 10:23:47.789] [WARN] [OrderService] Order ORD-456 delayed - expected date passed +\`\`\` + +--- + +## Log Levels + +| Level | Description | Severity | +|-------|-------------|----------| +| DEBUG | Detailed diagnostic information | Low | +| INFO | General informational messages | Low | +| WARN | Warning messages for potential issues | Medium | +| ERROR | Error messages for failures | High | +| FATAL | Critical errors causing system failure | Critical | + +--- + +## Common Error Patterns + +### Database Errors + +\`\`\` +ORA-00001: unique constraint violated +ORA-01017: invalid username/password +ORA-12170: connection timeout +ORA-00060: deadlock detected +Connection timeout +Constraint violation +Foreign key violation +\`\`\` + +### WMS Business Errors + +\`\`\` +Insufficient stock +Stock not found +Product not found +Location occupied +Location not available +Task already completed +Order already processed +Invalid product code +Invalid container code +\`\`\` + +### Integration Errors + +\`\`\` +API call failed +Authentication failed +Token expired +Request timeout +JSON parse error +XML parse error +Connection refused +Service unavailable +\`\`\` + +### System Errors + +\`\`\` +Out of memory +OutOfMemoryException +StackOverflowException +File not found +Access denied +Permission denied +Disk full +Network unreachable +\`\`\` + +--- + +## MCP Tools for Logs + +### read_recent_logs + +Read the most recent log entries from a log file. + +**Parameters:** +- \`count\` - Number of lines to read (default: 100) +- \`log_file\` - Specific log file name (optional, uses most recent if not specified) + +**Example:** +\`\`\` +read_recent_logs(count=200) +read_recent_logs(count=50, log_file="error_20240115.log") +\`\`\` + +### search_logs + +Search for a keyword across all log files with context. + +**Parameters:** +- \`keyword\` - Search term (e.g., "ERROR", "PROD-123", "timeout") +- \`max_results\` - Maximum results to return (default: 50) +- \`context_lines\` - Lines of context before/after match (default: 2) + +**Example:** +\`\`\` +search_logs(keyword="ERROR", max_results=100) +search_logs(keyword="PROD-123", context_lines=5) +search_logs(keyword="timeout", max_results=20) +\`\`\` + +--- + +## Debugging Workflow + +### 1. Check Recent Activity + +Start by reading recent logs to understand current system state: + +\`\`\` +read_recent_logs(count=200) +\`\`\` + +### 2. Search for Errors + +Look for error patterns: + +\`\`\` +search_logs(keyword="ERROR", max_results=50) +search_logs(keyword="EXCEPTION", max_results=50) +search_logs(keyword="FAILED", max_results=50) +\`\`\` + +### 3. Search for Specific Entity + +Find references to specific orders, products, or tasks: + +\`\`\` +search_logs(keyword="ORDER-123", context_lines=5) +search_logs(keyword="PROD-456", context_lines=5) +\`\`\` + +### 4. Correlate with API/Database + +Once you find relevant log entries: +- Use \`query_wms_entities\` to check current entity state +- Use \`search_workflows\` to find related workflows +- Use \`call_query_api\` to verify data consistency + +--- + +## Log Analysis Tips + +### Time-Based Analysis + +Log timestamps help correlate events: +- Look for errors occurring at the same time +- Check for patterns (e.g., errors every hour, at specific times) +- Correlate with known system events (deployments, restarts) + +### Frequency Analysis + +- How often does this error occur? +- Is it increasing or decreasing over time? +- Does it happen at specific intervals? + +### Context Analysis + +Always request context lines when searching: +- See what happened before the error +- See what happened after the error +- Understand the execution flow + +### Pattern Recognition + +Look for common patterns: +- Same error message repeatedly +- Same product/order/task in multiple errors +- Same module or service causing issues +- Cascading failures (one error leading to others) + +--- + +## Common Debugging Scenarios + +### Scenario 1: Order Not Processing + +\`\`\` +1. search_logs(keyword="ORDER-123", context_lines=5) +2. query_wms_entities(entity_type="OutboundOrders", filter='z.Code == "ORDER-123"') +3. Check order status and error messages in both logs and database +\`\`\` + +### Scenario 2: Stock Discrepancy + +\`\`\` +1. search_logs(keyword="PROD-456", context_lines=3) +2. query_wms_entities(entity_type="Stocks", filter='z.ProductCode == "PROD-456"') +3. Compare expected vs actual stock levels +4. Check for stock movement tasks +\`\`\` + +### Scenario 3: Task Failures + +\`\`\` +1. search_logs(keyword="TASK-789", context_lines=5) +2. query_wms_entities(entity_type="Tasks", filter='z.Code == "TASK-789"') +3. Check task status, error message, and assigned user/device +\`\`\` + +### Scenario 4: Performance Issues + +\`\`\` +1. search_logs(keyword="timeout", max_results=100) +2. search_logs(keyword="slow", max_results=100) +3. Look for patterns in timeouts (specific operations, times, modules) +\`\`\` + +--- + +## Log Retention + +- Log files are typically rotated daily +- Older logs may be compressed or archived +- Check with system administrator for retention policy + +--- + +**Note:** Use log tools in combination with WMS entity queries for complete debugging picture. +`; +} + +module.exports = { + listResources, + readResource, +}; diff --git a/src/resources/query-examples.js b/src/resources/query-examples.js new file mode 100644 index 0000000..1cfa771 --- /dev/null +++ b/src/resources/query-examples.js @@ -0,0 +1,266 @@ +/** + * Query Examples Resources + * Provides example LINQ queries and diagnostic recipes for WMS entities. + */ + +function listResources() { + return [ + { + uri: 'wms://query-examples', + name: 'Query Examples', + description: 'LINQ query examples and diagnostic recipes for WMS entities', + mimeType: 'text/markdown', + }, + ]; +} + +async function readResource(uri) { + let content; + + switch (uri) { + case 'wms://query-examples': + content = getQueryExamples(); + break; + + default: + throw new Error(`Unknown query examples resource: ${uri}`); + } + + return { + contents: [{ + uri, + mimeType: 'text/markdown', + text: content, + }], + }; +} + +function getQueryExamples() { + return `# WMS LINQ Query Examples & Diagnostic Recipes + +> **Reading model** — \`query_wms_entities\` / \`count_wms_entities\` use \`QueryExecute\` +> (QueryType=Reading). Status/enum fields are **strings** (enum names), never integers. +> Always verify enum values via \`docs://entities/\` or \`get_entity_metadata\` before filtering. + +--- + +## Diagnostic Recipes + +Recipes below were validated against a live WMS. Use them as-is, substituting the +\`X\` placeholders. + +### OS incomplètes par classe d'expédition + +Compter les ordres de sortie incomplets, actifs, d'une classe donnée +(\`OutboundClassCode\`). Fields verified on the \`OutboundOrder\` Reading entity: +\`OutboundClassCode\` (string), \`IncompleteOrder\` (bool), \`IsActive\` (bool). + +\`\`\` +# Toutes classes confondues +count_wms_entities( + entity_type="OutboundOrders", + filter='z.IncompleteOrder == true && z.IsActive == true' +) + +# Pour une classe précise +count_wms_entities( + entity_type="OutboundOrders", + filter='z.OutboundClassCode == "SHIPPING_GROUP_01" && z.IncompleteOrder == true && z.IsActive == true' +) + +# Lister le détail des OS concernées +query_wms_entities( + entity_type="OutboundOrders", + filter='z.OutboundClassCode == "SHIPPING_GROUP_01" && z.IncompleteOrder == true && z.IsActive == true', + limit=200 +) +\`\`\` + +### Containers bloquants sur un emplacement + +Identifier les conteneurs qui retiennent un emplacement parce qu'ils ont des tâches +en attente. Fields verified on the \`Container\` Reading entity: +\`LocationCode\` (string), \`NumContainerPendingTasks\` (long). + +\`\`\` +# Combien de containers ont des tâches en attente sur l'emplacement +count_wms_entities( + entity_type="Containers", + filter='z.LocationCode == "QUAI_EXP_01" && z.NumContainerPendingTasks > 0' +) + +# Lister ces containers (renvoie toutes les colonnes du container) +query_wms_entities( + entity_type="Containers", + filter='z.LocationCode == "QUAI_EXP_01" && z.NumContainerPendingTasks > 0', + limit=200 +) + +# Vue globale : tous les containers bloquants du WMS +count_wms_entities( + entity_type="Containers", + filter='z.NumContainerPendingTasks > 0' +) +\`\`\` + +### Paramètres système d'un entrepôt + +Pour lire les paramètres de configuration WMS et leurs valeurs par entrepôt, +utiliser l'outil dédié \`get_system_parameters\` plutôt qu'une requête LINQ : + +\`\`\` +get_system_parameters(warehouse="DOMBASLE") # tous les paramètres +get_system_parameters(warehouse="DOMBASLE", param_class="Shipping") +get_system_parameters(search="CROSSDOCK") +\`\`\` + +### Modèles d'expédition — suivi des exécutions + +> ⚠️ L'API ne conserve que la **dernière** exécution de chaque modèle d'expédition +> (\`ShipmentTemplate.LastExecuteDate\`). L'historique complet des exécutions n'existe +> que dans les logs serveur \`ApplyShipmentTemplates\`, non exposés par ce MCP. + +Fields verified on the \`ShipmentTemplate\` Reading entity: \`Code\`, \`Status\`, +\`IsEnabled\`, \`IsActive\`, \`LastExecuteDate\`, \`WarehouseCode\`, \`Priority\`, +\`DirectiveCode\`. + +\`\`\` +# Tous les modèles d'un entrepôt + leur dernière exécution et leur statut +query_wms_entities( + entity_type="ShipmentTemplates", + filter='z.WarehouseCode == "DOMBASLE"', + limit=200 +) + +# Modèles activés mais jamais exécutés (LastExecuteDate null) +query_wms_entities( + entity_type="ShipmentTemplates", + filter='z.IsEnabled == true && z.LastExecuteDate == null', + limit=200 +) + +# Combien de modèles exécutés au moins une fois +count_wms_entities( + entity_type="ShipmentTemplates", + filter='z.LastExecuteDate != null' +) + +# Modèles exécutés depuis une date (littéral DateTime obligatoire — voir Date filters) +count_wms_entities( + entity_type="ShipmentTemplates", + filter='z.LastExecuteDate >= new DateTime(2025, 1, 1)' +) +\`\`\` + +--- + +## Counting (\`count_wms_entities\`) + +Always prefer \`count_wms_entities\` for any "combien" / "how many" question — it uses +\`QueryScalarExecute\` and never materialises rows. + +\`\`\` +count_wms_entities(entity_type="OutboundOrders") +count_wms_entities(entity_type="Tasks", filter='z.TaskStatus == "InProcess"') +\`\`\` + +--- + +## Basic Queries + +### Get rows (with limit) + +\`\`\` +query_wms_entities(entity_type="Products", limit=100) +query_wms_entities(entity_type="Tasks", limit=50) +\`\`\` + +> Note: the \`select_expression\` parameter (LINQ projections) is currently unreliable +> against \`QueryExecute\` — prefer querying full rows and reading the fields you need. + +## Filtering Examples + +### Status filters (string enum names) + +\`\`\` +# Tâches en cours / en attente +query_wms_entities(entity_type="Tasks", filter='z.TaskStatus == "InProcess"', limit=100) +query_wms_entities(entity_type="Tasks", filter='z.TaskStatus == "Pending"', limit=100) + +# Ordres de sortie lancés +query_wms_entities(entity_type="OutboundOrders", filter='z.OutboundOrderStatus == "Release"', limit=100) +\`\`\` + +### Date filters + +> ⚠️ \`AddDays()\` et les dates relatives (\`DateTime.Now\`, \`DateTime.Today\`) ne sont +> **pas traduisibles** par le moteur de requête — toujours utiliser un littéral +> \`new DateTime(année, mois, jour)\`. Le nom du champ date dépend de l'entité +> (\`LastExecuteDate\`, \`InternalInfo.CreationDate\`, …) — le vérifier via +> \`get_entity_metadata\` ou \`docs://entities/\`. + +\`\`\` +# Éléments depuis une date donnée (littéral DateTime obligatoire) +count_wms_entities( + entity_type="ShipmentTemplates", + filter='z.LastExecuteDate >= new DateTime(2025, 1, 1)' +) +\`\`\` + +### Numeric filters + +\`\`\` +query_wms_entities(entity_type="Stocks", filter="z.Quantity > 0", limit=100) +\`\`\` + +### String filters + +\`\`\` +query_wms_entities(entity_type="Products", filter='z.Code.StartsWith("ABC")', limit=100) +query_wms_entities(entity_type="Products", filter='z.Code.Contains("test")', limit=100) +\`\`\` + +## Complex Filters + +### Multiple conditions (AND / OR) + +\`\`\` +query_wms_entities( + entity_type="Tasks", + filter='z.TaskStatus == "Pending" && z.Priority > 50', + limit=100 +) + +query_wms_entities( + entity_type="OutboundOrders", + filter='z.OutboundOrderStatus == "Release" || z.OutboundOrderStatus == "Creating"', + limit=100 +) +\`\`\` + +## Common Patterns + +### Find an entity by code + +\`\`\` +query_wms_entities(entity_type="Products", filter='z.Code == "PROD123"', limit=1) +query_wms_entities(entity_type="OutboundOrders", filter='z.Code == "ORDER123"', limit=1) +\`\`\` + +## Performance Tips + +1. **Always use limits** — max 1000 rows per query. +2. **Use \`count_wms_entities\` for counts** — never fetch rows just to count them. +3. **Verify enum values first** — Reading model uses string enum names. +4. **Use specific filters** — narrow results at the API level. + +--- + +**Note:** All queries respect the maximum limit of 1000 rows configured in the server. +`; +} + +module.exports = { + listResources, + readResource, +}; diff --git a/src/resources/wms-entities.js b/src/resources/wms-entities.js new file mode 100644 index 0000000..6682ec2 --- /dev/null +++ b/src/resources/wms-entities.js @@ -0,0 +1,141 @@ +/** + * WMS Entity Resources + * Provides overview of WMS entity types available via Query API + */ + +function listResources() { + return [ + { + uri: 'wms://entities', + name: 'WMS Entities Overview', + description: 'Overview of all WMS entity types available for querying', + mimeType: 'text/markdown', + }, + ]; +} + +async function readResource(uri) { + let content; + + switch (uri) { + case 'wms://entities': + content = getEntitiesOverview(); + break; + + default: + throw new Error(`Unknown WMS entity resource: ${uri}`); + } + + return { + contents: [{ + uri, + mimeType: 'text/markdown', + text: content, + }], + }; +} + +function getEntitiesOverview() { + return `# WMS Entities — Reference Guide + +## Tools to use + +- **\`count_wms_entities\`** — count with optional filter (use for "combien", "nombre de") +- **\`query_wms_entities\`** — fetch rows with select/filter/limit +- **\`get_entity_schema\`** — discover field names by fetching one sample record +- **\`call_query_api\`** — raw LINQ query, full control + +--- + +## Note importante : Reading model vs Writing model + +Le \`QueryExecute\` (Context.*) interroge le **Reading model** — les champs de statut sont des **strings**, pas des entiers ni des enums C#. + +--- + +## OutboundOrders — Ordres de sortie + +**Reading model:** \`Mecalux.ITSW.EasyWMS.Modules.Expeditions.Reading.Domain.OutboundOrder\` +**Status field:** \`OutboundOrderStatus\` → **string** + +| Statut | Filtre LINQ | +|---|---| +| Lancé | \`z.OutboundOrderStatus == "Launched"\` | +| En attente | \`z.OutboundOrderStatus == "Waiting"\` | +| En création | \`z.OutboundOrderStatus == "Creating"\` | + +**Champs clés :** \`Code\`, \`OutboundOrderStatus\`, \`WarehouseCode\`, \`AccountCode\`, \`RouteCode\`, \`Priority\`, \`AssignedUser\`, \`NumPendingTasks\`, \`NumReleasedLines\`, \`HasTroubles\`, \`ShippingDeadline\` + +**Exemples:** +\`\`\` +// Compter les ODS lancés +count_wms_entities(entity_type="OutboundOrders", filter='z.OutboundOrderStatus == "Launched"') + +// Lister les ODS lancés avec infos clés +query_wms_entities(entity_type="OutboundOrders", + select_expression="z => new { z.Code, z.OutboundOrderStatus, z.AccountCode, z.NumPendingTasks, z.HasTroubles }", + filter='z.OutboundOrderStatus == "Launched"', limit=100) +\`\`\` + +--- + +## InboundOrders — Ordres d'entrée + +**Status field:** \`InboundStatus\` → **string** + +| Statut | Filtre LINQ | +|---|---| +| Réception en attente | \`z.InboundStatus == "ReceptionPending"\` | +| Réception en cours | \`z.InboundStatus == "Receiving"\` | +| Complété | \`z.InboundStatus == "Completed"\` | +| Reçu partiellement | \`z.InboundStatus == "PartiallyReceived"\` | +| Annulé | \`z.InboundStatus == "Cancelled"\` | +| Fermeture | \`z.InboundStatus == "Closing"\` | + +--- + +## Tasks — Tâches + +**Status field:** \`TaskStatus\` → **string** (valeurs à confirmer via get_entity_schema) + +\`\`\` +// Schéma exact avec valeurs d'exemple +get_entity_schema(entity_type="Tasks") +\`\`\` + +--- + +## Kits + +\`\`\` +count_wms_entities(entity_type="Kits", filter="z.IsEnable == true") +\`\`\` + +--- + +## Autres entités disponibles (Reading model, 278 au total) + +**Opérations :** Tasks, Stocks, ProductLocations, ContainerLock, CountOrder, CountOrderLine +**Entrepôt :** Location, Aisle, AisleType, Division, Container, ContainerType +**Entrées :** InboundOrders, Receptions, InboundClass +**Sorties :** OutboundOrders, Shipment, OutboundClass, Wave +**Référentiel :** Products, Accounts, Suppliers, Kits, Aliases, Agency, Route + +**Pour connaître les champs exacts d'une entité :** +1. \`get_entity_metadata(entity_name="...")\` — métadonnées officielles via l'API +2. \`get_entity_schema(entity_type="...")\` — exemple live avec tous les champs + +--- + +## Note sur \`Take()\` + +Certaines entités (dont OutboundOrders) peuvent retourner HTTP 500 si \`Take()\` est ajouté. +- **count_wms_entities** n'utilise jamais \`Take()\` → toujours sûr +- **query_wms_entities** utilise \`Take(limit)\` → préférer une limite raisonnable (100-500) +`; +} + +module.exports = { + listResources, + readResource, +}; diff --git a/src/resources/workflows.js b/src/resources/workflows.js new file mode 100644 index 0000000..15d5053 --- /dev/null +++ b/src/resources/workflows.js @@ -0,0 +1,96 @@ +/** + * Workflow Resources + * Provides context about workflows available via API + */ + +function listResources() { + return [ + { + uri: 'workflows://overview', + name: 'Workflow Overview', + description: 'Overview of workflow system and available categories', + mimeType: 'text/markdown', + }, + ]; +} + +async function readResource(uri) { + let content; + + switch (uri) { + case 'workflows://overview': + content = getWorkflowOverview(); + break; + + default: + throw new Error(`Unknown workflow resource: ${uri}`); + } + + return { + contents: [{ + uri, + mimeType: 'text/markdown', + text: content, + }], + }; +} + +function getWorkflowOverview() { + return `# WMS Workflows + +## Overview + +Workflows are retrieved via the **Workflow API** (\`/AD/api/Workflow/GetByApplication\`). + +**Total Workflows:** ~3712 +**Data Source:** API endpoint (lazy loaded with 1-hour cache) +**Pagination:** Configurable page size (default: 5000) + +## Available Tools + +Use these tools to interact with workflows: + +### \`search_workflows\` +Search workflows by name, description, or code. +- Supports category filtering +- Returns workflow metadata +- Workflows are cached after first request + +### \`get_workflow_details\` +Get complete details of a specific workflow by ID or code. + +### \`list_workflow_categories\` +List all available workflow categories with statistics. + +## Common Workflow Categories + +- **EasyWMS**: Core WMS workflows +- **CustomApplication**: Custom workflows +- **Deliveries**: Delivery and shipping workflows +- **AccountDirective**: Account management workflows +- **Notifications**: Notification workflows +- **LaborManagement**: Labor management workflows + +## Usage Examples + +\`\`\` +# Search for order-related workflows +search_workflows(query="Order", limit=20) + +# Get workflow details +get_workflow_details(workflow_id="abc123") + +# List all categories +list_workflow_categories() +\`\`\` + +--- + +**Note:** Workflows are fetched from the API only when first requested, then cached for 1 hour to improve performance. +`; +} + +module.exports = { + listResources, + readResource, +}; diff --git a/src/services/ad-service.js b/src/services/ad-service.js new file mode 100644 index 0000000..bf46f52 --- /dev/null +++ b/src/services/ad-service.js @@ -0,0 +1,259 @@ +/** + * Application Dictionary Service + * Handles fetching of all AD element types (Commands, Queries, Dialogs, Views, etc.) + * Implements lazy loading and caching similar to workflow-service.js + */ + +const apiService = require('./api-service').getInstance(); +const profileManager = require('../config/profile-manager'); + +// Cache state - one cache per element type +const cache = {}; +const cacheTimestamps = {}; +const CACHE_TTL = parseInt(process.env.WORKFLOW_CACHE_TTL) || 3600000; // 1 hour + +// Invalidate all caches when profile changes — AD elements are per-tenant. +profileManager.onSwitch(() => invalidateCache()); + +// Element types and their recommended page sizes +// Note: WorkflowAction and WritingModel removed (404 Not Found on API) +const AD_ELEMENT_TYPES = { + // Heavy types requiring pagination + Workflow: 5000, + View: 200, + Resource: 15000, + + // Light types - fetch all at once + Command: 100000, + Dashboard: 100000, + Dialog: 100000, + Entity: 100000, + Event: 100000, + FieldType: 100000, + Hook: 100000, + List: 100000, + Query: 100000, + Record: 100000, + Relationship: 100000, + Report: 100000, + Subscription: 100000, + TimelineTemplate: 100000, + Toggle: 100000, + Validator: 100000, + ViewGroup: 100000 +}; + +/** + * Check if cache is valid for a given element type + */ +function isCacheValid(elementType) { + if (!cache[elementType] || !cacheTimestamps[elementType]) { + return false; + } + + const now = Date.now(); + const age = now - cacheTimestamps[elementType]; + return age < CACHE_TTL; +} + +/** + * Get all elements of a specific type from AD API + * Implements lazy loading with caching and pagination + * + * @param {string} elementType - Type of element (Command, Query, Dialog, etc.) + * @returns {Promise} Array of elements + */ +async function getElements(elementType) { + // Validate element type + if (!AD_ELEMENT_TYPES[elementType]) { + throw new Error(`Unknown element type: ${elementType}. Valid types: ${Object.keys(AD_ELEMENT_TYPES).join(', ')}`); + } + + // Check cache + if (isCacheValid(elementType)) { + console.error(`[AD] Cache hit: ${elementType} (${cache[elementType].length} elements)`); + return cache[elementType]; + } + + console.error(`[AD] Cache expired or empty, fetching ${elementType}...`); + + try { + let allElements = []; + let offset = 0; + const pageSize = AD_ELEMENT_TYPES[elementType]; + const profile = profileManager.getCurrent(); + const application = profile.application; + const tenant = profile.tenant; + + while (true) { + const body = [application, tenant, pageSize, offset]; + + console.error(`[AD] Fetching ${elementType}: offset=${offset}, pageSize=${pageSize}`); + + // Use AD API (useAdApi=true) + const response = await apiService.post(`/${elementType}/GetByApplication`, body, true); + + // Extract entities array from response + const elements = response?.entities || []; + + // Check if response is valid + if (!elements || elements.length === 0) { + console.error(`[AD] No more ${elementType} to fetch`); + break; + } + + allElements = allElements.concat(elements); + console.error(`[AD] Fetched ${elements.length} ${elementType} (total: ${allElements.length})`); + + // If we got less than page size, we've reached the last page + if (elements.length < pageSize) { + console.error(`[AD] Last page of ${elementType} reached`); + break; + } + + offset += pageSize; + } + + // Update cache + cache[elementType] = allElements; + cacheTimestamps[elementType] = Date.now(); + + console.error(`[AD] Successfully cached ${allElements.length} ${elementType}`); + return allElements; + } catch (error) { + console.error(`[AD] Error fetching ${elementType}:`, error.message); + throw new Error(`Failed to fetch ${elementType}: ${error.message}`); + } +} + +/** + * Search elements by query string + * @param {string} elementType - Type of element + * @param {string} query - Search query (matches name, description, etc.) + * @param {number} limit - Maximum results to return + */ +async function searchElements(elementType, query, limit = 50) { + const elements = await getElements(elementType); + + if (!query) { + return elements.slice(0, limit); + } + + const lowerQuery = query.toLowerCase(); + const results = elements.filter(e => { + const name = (e.name || e.Name || '').toLowerCase(); + const description = (e.description || e.Description || '').toLowerCase(); + const code = (e.code || e.Code || '').toLowerCase(); + + return name.includes(lowerQuery) || + description.includes(lowerQuery) || + code.includes(lowerQuery); + }); + + return results.slice(0, limit); +} + +/** + * Get element details by ID or name + * @param {string} elementType - Type of element + * @param {string|number} elementId - Element ID or name + */ +async function getElementDetails(elementType, elementId) { + const elements = await getElements(elementType); + + // Try to find by Id, id, Code, code, Name, or name + const element = elements.find(e => + e.id === elementId || + e.Id === elementId || + e.id === parseInt(elementId) || + e.Id === parseInt(elementId) || + e.Code === elementId || + e.code === elementId || + e.Name === elementId || + e.name === elementId + ); + + if (!element) { + throw new Error(`${elementType} not found: ${elementId}`); + } + + return element; +} + +/** + * Get application summary (count of each element type) + * Only loads types that are already cached to avoid long wait times + */ +function getApplicationSummary() { + const summary = {}; + + Object.keys(AD_ELEMENT_TYPES).forEach(type => { + if (cache[type]) { + summary[type] = { + count: cache[type].length, + cached: true, + cacheAge: cacheTimestamps[type] ? Math.floor((Date.now() - cacheTimestamps[type]) / 1000) : null + }; + } else { + summary[type] = { + count: 0, + cached: false, + cacheAge: null + }; + } + }); + + return summary; +} + +/** + * Invalidate cache for a specific type or all types + */ +function invalidateCache(elementType = null) { + if (elementType) { + delete cache[elementType]; + delete cacheTimestamps[elementType]; + console.error(`[AD] Cache invalidated: ${elementType}`); + } else { + Object.keys(cache).forEach(k => { + delete cache[k]; + delete cacheTimestamps[k]; + }); + console.error('[AD] All caches invalidated'); + } +} + +/** + * Get cache status + */ +function getCacheStatus() { + const status = {}; + Object.keys(AD_ELEMENT_TYPES).forEach(type => { + status[type] = { + cached: !!cache[type], + count: cache[type] ? cache[type].length : 0, + timestamp: cacheTimestamps[type], + age: cacheTimestamps[type] ? Math.floor((Date.now() - cacheTimestamps[type]) / 1000) : null, + valid: isCacheValid(type) + }; + }); + return status; +} + +/** + * Get list of available element types + */ +function getAvailableTypes() { + return Object.keys(AD_ELEMENT_TYPES).sort(); +} + +module.exports = { + getElements, + searchElements, + getElementDetails, + getApplicationSummary, + invalidateCache, + getCacheStatus, + getAvailableTypes, + AD_ELEMENT_TYPES +}; diff --git a/src/services/api-service.js b/src/services/api-service.js new file mode 100644 index 0000000..fde5356 --- /dev/null +++ b/src/services/api-service.js @@ -0,0 +1,393 @@ +/** + * WMS API Service + * Handles OAuth authentication and HTTP requests to WMS APIs + * Supports both ApplicationService API and Workflow (AD) API + * + * All WMS-specific settings (host, credentials, tenant, application) are + * read from the active profile via profile-manager. + */ + +const axios = require('axios'); +const https = require('https'); +const profileManager = require('../config/profile-manager'); + +class APIService { + constructor() { + this.token = null; + this.refreshToken = null; + this.tokenTimestamp = null; + this.tokenRefreshThreshold = parseInt(process.env.TOKEN_REFRESH_THRESHOLD) || 1000; // seconds + this.tokenMaxAge = parseInt(process.env.TOKEN_MAX_AGE) || 1190; // seconds + + // Create axios instance with SSL verification disabled (for internal servers) + this.httpClient = axios.create({ + httpsAgent: new https.Agent({ + rejectUnauthorized: false + }), + timeout: parseInt(process.env.QUERY_TIMEOUT) || 30000 + }); + + // Reset token when the active profile changes — credentials no longer apply. + profileManager.onSwitch(() => this.resetToken()); + } + + /** + * Get token age in seconds + */ + getTokenAge() { + if (!this.tokenTimestamp) return Infinity; + return (Date.now() - this.tokenTimestamp) / 1000; + } + + /** + * Check if token needs refresh + */ + needsRefresh() { + return this.getTokenAge() > this.tokenRefreshThreshold; + } + + /** + * Authenticate and get initial OAuth token + */ + async authenticate() { + const profile = profileManager.getCurrent(); + try { + console.error(`[API] Authenticating profile="${profile.name}" tenant="${profile.tenant}" ...`); + + const response = await this.httpClient.post( + profile.tokenUrl, + new URLSearchParams({ + grant_type: 'password', + tenant_code: profile.tenant, + username: profile.username, + password: profile.password + }).toString(), + { + headers: { + 'Authorization': profile.auth, + 'Content-Type': 'application/x-www-form-urlencoded' + } + } + ); + + this.token = response.data.access_token; + this.refreshToken = response.data.refresh_token; + this.tokenTimestamp = Date.now(); + + console.error(`[API] Authentication successful. Token expires in ~${this.tokenMaxAge}s`); + return this.token; + } catch (error) { + console.error('[API] Authentication failed:', error.message); + throw new Error(`Authentication failed: ${error.message}`); + } + } + + /** + * Refresh OAuth token + */ + async refreshOAuthToken() { + const tokenAge = this.getTokenAge(); + + try { + // If token is too old (>= maxAge), use password grant + if (tokenAge >= this.tokenMaxAge) { + console.error('[API] Token too old, re-authenticating with password...'); + return await this.authenticate(); + } + + // Otherwise use refresh_token grant + console.error('[API] Refreshing token with refresh_token grant...'); + + const profile = profileManager.getCurrent(); + const response = await this.httpClient.post( + profile.tokenUrl, + new URLSearchParams({ + grant_type: 'refresh_token', + refresh_token: this.refreshToken + }).toString(), + { + headers: { + 'Authorization': profile.auth, + 'Content-Type': 'application/x-www-form-urlencoded' + } + } + ); + + this.token = response.data.access_token; + this.refreshToken = response.data.refresh_token; + this.tokenTimestamp = Date.now(); + + console.error('[API] Token refreshed successfully'); + return this.token; + } catch (error) { + console.error('[API] Token refresh failed, re-authenticating:', error.message); + return await this.authenticate(); + } + } + + /** + * Ensure token is valid before making requests + */ + async ensureTokenValid() { + if (!this.token) { + await this.authenticate(); + } else if (this.needsRefresh()) { + await this.refreshOAuthToken(); + } + } + + /** + * Make a POST request to WMS API + * @param {string} endpoint - API endpoint (e.g., '/QueryExecute' or '/AD/api/Workflow/GetByApplication') + * @param {object} data - Request body + * @param {boolean} useAdApi - Use AD API base URL instead of ApplicationService + */ + async post(endpoint, data, useAdApi = false) { + await this.ensureTokenValid(); + + const profile = profileManager.getCurrent(); + const baseUrl = useAdApi ? profile.workflowApiBase : profile.apiBaseUrl; + const url = endpoint.startsWith('http') ? endpoint : `${baseUrl}${endpoint}`; + + try { + console.error(`[API] POST ${endpoint}`); + + const response = await this.httpClient.post(url, data, { + headers: { + 'Authorization': `Bearer ${this.token}`, + 'Content-Type': 'application/json', + 'Accept': 'application/json' + } + }); + + return response.data; + } catch (error) { + console.error(`[API] Request failed: ${error.message}`); + + // If unauthorized, try refreshing token and retry once + if (error.response?.status === 401) { + console.error('[API] Unauthorized, refreshing token and retrying...'); + await this.refreshOAuthToken(); + + const retryResponse = await this.httpClient.post(url, data, { + headers: { + 'Authorization': `Bearer ${this.token}`, + 'Content-Type': 'application/json', + 'Accept': 'application/json' + } + }); + + return retryResponse.data; + } + + throw error; + } + } + + /** + * Make a GET request to WMS API + * @param {string} endpoint - API endpoint + * @param {object} params - Query parameters + * @param {boolean} useAdApi - Use AD API base URL instead of ApplicationService + */ + async get(endpoint, params = {}, useAdApi = false) { + await this.ensureTokenValid(); + + const profile = profileManager.getCurrent(); + const baseUrl = useAdApi ? profile.workflowApiBase : profile.apiBaseUrl; + const url = endpoint.startsWith('http') ? endpoint : `${baseUrl}${endpoint}`; + + try { + console.error(`[API] GET ${endpoint}`); + + const response = await this.httpClient.get(url, { + params, + headers: { + 'Authorization': `Bearer ${this.token}`, + 'Accept': 'application/json' + } + }); + + return response.data; + } catch (error) { + console.error(`[API] Request failed: ${error.message}`); + + // If unauthorized, try refreshing token and retry once + if (error.response?.status === 401) { + console.error('[API] Unauthorized, refreshing token and retrying...'); + await this.refreshOAuthToken(); + + const retryResponse = await this.httpClient.get(url, { + params, + headers: { + 'Authorization': `Bearer ${this.token}`, + 'Accept': 'application/json' + } + }); + + return retryResponse.data; + } + + throw error; + } + } + + /** + * Execute a LINQ query via WMS QueryExecute API. + * Take/Skip/Select are top-level API params. OrderBy MUST be embedded in the Expression. + * The Expression should contain: base path + optional Where + OrderBy (required when Take is used): + * e.g. "Context.OutboundOrders.Where(z => z.OutboundOrderStatus == \"Release\").OrderBy(z => z.Id)" + * + * @param {string} expression - LINQ expression (Context.Entity or Context.Entity.Where(...)) + * @param {object} options - { take, skip, select, orderBy, inlineCount } + */ + async executeQuery(expression, options = {}) { + const { take, skip, select, orderBy, inlineCount } = options; + + const body = { + Application: profileManager.getCurrent().application, + QueryType: 0, // Reading = 0 (status fields are strings), Writing = 1 (enums) + Expression: expression, + }; + + if (take != null) body.Take = take; + if (skip != null) body.Skip = skip; + if (select != null) body.Select = select; + if (orderBy != null) body.OrderBy = orderBy; + if (inlineCount != null) body.InlineCount = inlineCount; + + const raw = await this.post('/QueryExecute', body); + return this._parseQueryResponse(raw); + } + + /** + * Parse QueryExecute response — handles both response shapes: + * - Flat array (legacy / full-LINQ-in-expression queries) + * - Table object { Table: { Columns, Rows } } + */ + _parseQueryResponse(raw) { + if (Array.isArray(raw)) return raw; + if (raw?.Table?.Rows) { + return raw.Table.Rows + .filter(Boolean) + .map(row => row.Values ?? row); + } + return raw; + } + + /** + * Execute a scalar LINQ query (Count, Sum, etc.) via QueryScalarExecute. + * Returns the scalar value directly. + * @param {string} fullExpression - e.g. "Context.OutboundOrders.Where(...).Count()" + */ + async executeScalarQuery(fullExpression) { + const body = { + Application: profileManager.getCurrent().application, + QueryType: 0, // Reading = 0 — string enum names in filters (Writing=1 fails with enum comparisons) + Expression: fullExpression, + }; + + const result = await this.post('/QueryScalarExecute', body); + return result?.Rows?.[0]?.Values?.Column ?? result; + } + + /** + * List queryable entities via Metadata API. + * @param {string} [applicationName] - Override application name (defaults to active profile's app) + */ + async getMetadataEntities(applicationName) { + const app = applicationName || profileManager.getCurrent().application; + return await this.get(`/Metadata/Entities?applicationName=${encodeURIComponent(app)}`); + } + + /** + * Get properties of a specific entity via Metadata API. + * @param {string} assemblyFullName - e.g. "Mecalux.ITSW.EasyWMS.Modules.Contracts" + * @param {string} fullName - e.g. "Mecalux.ITSW.EasyWMS.Modules.Contracts.Domain.OutboundOrder" + */ + async getEntityProperties(assemblyFullName, fullName) { + const qs = `assemblyFullName=${encodeURIComponent(assemblyFullName)}&fullName=${encodeURIComponent(fullName)}`; + return await this.get(`/Metadata/EntityProperties?${qs}`); + } + + /** + * Get GenericSearch categories (indexed document types). + * @param {string} [applicationName] + */ + async getSearchCategories(applicationName) { + const app = applicationName || profileManager.getCurrent().application; + return await this.get(`/GenericSearch/Categories?applicationName=${encodeURIComponent(app)}`); + } + + /** + * Full-text search via GenericSearch API. + * @param {string} query - Search keyword + * @param {string[]} categories - Document categories to search (from getSearchCategories) + * @param {number} take - Max results + * @param {number} skip - Offset + * @param {string} [applicationName] + */ + async genericSearch(query, categories = [], take = 20, skip = 0, applicationName) { + const body = { + ApplicationName: applicationName || profileManager.getCurrent().application, + Query: query, + Categories: categories, + Take: take, + Skip: skip, + }; + return await this.post('/GenericSearch/Search', body); + } + + /** + * Execute a WMS command + * @param {string} commandName - Full command name + * @param {object} properties - Command properties + */ + async executeCommand(commandName, properties) { + // Use command_name as-is — appending assembly suffix causes FileLoadException. + // The InternalCommandName from AD already contains the correct fully-qualified name. + const command = [{ + Name: commandName, + Properties: properties + }]; + + return await this.post('/CommandExecute', command); + } + + /** + * Test API connection + */ + async testConnection() { + try { + await this.ensureTokenValid(); + return true; + } catch (error) { + console.error('[API] Connection test failed:', error.message); + return false; + } + } + + /** + * Reset token (force re-authentication) + */ + resetToken() { + if (this.token) { + console.error('[API] Token reset'); + } + this.token = null; + this.refreshToken = null; + this.tokenTimestamp = null; + } +} + +// Singleton instance +let instance = null; + +module.exports = { + getInstance() { + if (!instance) { + instance = new APIService(); + } + return instance; + } +}; diff --git a/src/services/log-service.js b/src/services/log-service.js new file mode 100644 index 0000000..94d9778 --- /dev/null +++ b/src/services/log-service.js @@ -0,0 +1,412 @@ +const fs = require('fs').promises; +const path = require('path'); +const profileManager = require('../config/profile-manager'); + +/** + * Service de gestion des logs + * Supporte plusieurs emplacements de logs : + * - IIS logs: \\\inetpub\logs\LogFiles\Mecalux (avec sous-dossiers) + * - ETL middleware: \\\ProgramData\Mecalux\ETLLogs + * + * LOGS_PATH dans .env peut contenir le placeholder "{host}" qui est remplacé + * par le host du profil actif à chaque appel. + * + * En mode SaaS (profile.saas === true) l'accès aux logs est bloqué car le + * WMS est hébergé dans le cloud et le filesystem n'est pas joignable. + */ + +const DEFAULT_LOG_PATHS = [ + '\\\\{host}\\inetpub\\logs\\LogFiles\\Mecalux', + '\\\\{host}\\ProgramData\\Mecalux\\ETLLogs', +]; + +const LOG_FILE_PATTERN = process.env.LOG_FILE_PATTERN || '*.log'; + +/** + * Retourne les chemins de logs à scanner pour le profil actif. + * Substitue {host} par l'hostname du profil. + * Lance une erreur si le profil est en mode SaaS. + */ +function getLogPaths() { + const profile = profileManager.getCurrent(); + if (profile.saas) { + throw new Error(`Log access is disabled for SaaS profile "${profile.name}". The WMS is cloud-hosted — local log files are not reachable. Use the WMS API (query/command/workflow tools) instead.`); + } + + const templates = process.env.LOGS_PATH + ? process.env.LOGS_PATH.split(';').map(p => p.trim()).filter(Boolean) + : DEFAULT_LOG_PATHS; + + return templates.map(t => t.replace(/\{host\}/g, profile.host)); +} + +/** + * Scanne récursivement un dossier pour trouver tous les fichiers .log + * @param {string} dir - Dossier à scanner + * @param {Array} fileList - Liste accumulée des fichiers (pour la récursion) + * @returns {Promise} - Liste des fichiers trouvés + */ +async function scanLogsRecursively(dir, fileList = []) { + try { + const entries = await fs.readdir(dir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + + if (entry.isDirectory()) { + // Récursion dans les sous-dossiers + await scanLogsRecursively(fullPath, fileList); + } else if (entry.isFile() && entry.name.endsWith('.log')) { + try { + const stats = await fs.stat(fullPath); + fileList.push({ + name: entry.name, + path: fullPath, + relativePath: path.relative(dir, fullPath), + directory: path.dirname(fullPath), + size: stats.size, + modified: stats.mtime, + }); + } catch (statErr) { + // Ignorer les fichiers inaccessibles + console.error(`Cannot access file ${fullPath}: ${statErr.message}`); + } + } + } + } catch (err) { + // Ne pas planter si un dossier n'existe pas ou n'est pas accessible + console.error(`Cannot scan directory ${dir}: ${err.message}`); + } + + return fileList; +} + +/** + * Liste tous les fichiers de logs dans tous les répertoires configurés + * @returns {Promise} - Liste des fichiers de logs + */ +async function listLogFiles() { + const logPaths = getLogPaths(); + const allFiles = []; + + // Scanner chaque chemin configuré + for (const logPath of logPaths) { + const files = await scanLogsRecursively(logPath); + allFiles.push(...files); + } + + if (allFiles.length === 0) { + const pathsList = logPaths.join(', '); + throw new Error(`No log files found in configured paths: ${pathsList}`); + } + + // Trier par date de modification (plus récent en premier) + allFiles.sort((a, b) => b.modified - a.modified); + + return allFiles; +} + +/** + * Trouve le fichier de log le plus récent + * @returns {Promise} - Chemin du fichier le plus récent + */ +async function findLatestLogFile() { + const files = await listLogFiles(); + + if (files.length === 0) { + throw new Error('No log files found'); + } + + return files[0].path; +} + +/** + * Vérifie si un fichier existe + * @param {string} filePath + * @returns {Promise} + */ +async function fileExists(filePath) { + try { + await fs.access(filePath); + return true; + } catch { + return false; + } +} + +/** + * Résout le chemin d'un fichier de log en 3 passes : + * 1. Chemin direct (LOGS_PATH + logFile, peut inclure un sous-dossier) + * 2. Nom de fichier exact dans chaque sous-dossier immédiat de LOGS_PATH + * 3. Correspondance floue (partielle, insensible à la casse) + * En cas d'échec, retourne une erreur avec la liste des fichiers disponibles. + * @param {string} logFile - Nom ou chemin partiel du fichier + * @returns {Promise} - Chemin absolu résolu + */ +async function resolveLogFilePath(logFile) { + // Si chemin absolu fourni directement + if (path.isAbsolute(logFile)) { + if (await fileExists(logFile)) return logFile; + throw new Error(`File not found: ${logFile}`); + } + + const basePath = getLogPaths()[0]; + + // Passe 1 — Chemin direct (ex: "ApplicationDictionary\ApplicationDictionary.log") + const directPath = path.join(basePath, logFile); + if (await fileExists(directPath)) return directPath; + + // Passe 2 & 3 — Scanner les sous-dossiers immédiats + const fileName = path.basename(logFile); + const fileNameNoExt = path.basename(fileName, path.extname(fileName)).toLowerCase(); + let subEntries = []; + try { + subEntries = await fs.readdir(basePath, { withFileTypes: true }); + } catch (err) { + console.error(`Cannot read base log path ${basePath}: ${err.message}`); + } + + const subDirs = subEntries.filter(e => e.isDirectory()).map(e => e.name); + + // Passe 2 — Nom exact dans les sous-dossiers + for (const dir of subDirs) { + const candidate = path.join(basePath, dir, fileName); + if (await fileExists(candidate)) return candidate; + } + + // Passe 3 — Correspondance floue + for (const dir of subDirs) { + let dirFiles = []; + try { + dirFiles = await fs.readdir(path.join(basePath, dir)); + } catch { + continue; + } + for (const f of dirFiles) { + if (!f.endsWith('.log')) continue; + const fNoExt = path.basename(f, path.extname(f)).toLowerCase(); + if (fNoExt.includes(fileNameNoExt) || fileNameNoExt.includes(fNoExt)) { + return path.join(basePath, dir, f); + } + } + } + + // Aucun fichier trouvé — construire une liste utile + const available = []; + for (const dir of subDirs) { + try { + const files = await fs.readdir(path.join(basePath, dir)); + files.filter(f => f.endsWith('.log')).forEach(f => available.push(`${dir}\\${f}`)); + } catch { /* ignorer */ } + } + + const availableMsg = available.length > 0 + ? `Available log files:\n${available.join('\n')}` + : `No log files found in ${basePath}`; + + throw new Error(`Log file "${logFile}" not found.\n${availableMsg}`); +} + +/** + * Lit les dernières lignes d'un fichier de log + * @param {number} count - Nombre de lignes à lire + * @param {string} logFile - Nom ou chemin partiel du fichier (optionnel, prend le plus récent par défaut) + * @returns {Promise} - Lignes du log + */ +async function readRecentLogs(count = 100, logFile = null) { + try { + const filePath = logFile + ? await resolveLogFilePath(logFile) + : await findLatestLogFile(); + + // Lire le fichier complet + const content = await fs.readFile(filePath, 'utf8'); + const lines = content.split('\n').filter((line) => line.trim() !== ''); + + // Prendre les dernières lignes + const recentLines = lines.slice(-count); + + return { + file: path.basename(filePath), + fullPath: filePath, + totalLines: lines.length, + returnedLines: recentLines.length, + lines: recentLines, + }; + } catch (err) { + throw new Error(`Failed to read log file: ${err.message}`); + } +} + +/** + * Recherche un mot-clé dans les fichiers de logs + * @param {string} keyword - Mot-clé à rechercher + * @param {number} maxResults - Nombre maximum de résultats + * @param {number} contextLines - Nombre de lignes de contexte avant/après + * @returns {Promise} - Résultats de la recherche + */ +async function searchLogs(keyword, maxResults = 50, contextLines = 2) { + try { + const files = await listLogFiles(); + const results = []; + const searchPattern = keyword.toLowerCase(); + + // Rechercher dans chaque fichier (du plus récent au plus ancien) + for (const file of files) { + if (results.length >= maxResults) break; + + try { + const content = await fs.readFile(file.path, 'utf8'); + const lines = content.split('\n'); + + // Rechercher dans chaque ligne + for (let i = 0; i < lines.length; i++) { + if (results.length >= maxResults) break; + + const line = lines[i]; + if (line.toLowerCase().includes(searchPattern)) { + // Extraire le contexte (lignes avant et après) + const start = Math.max(0, i - contextLines); + const end = Math.min(lines.length, i + contextLines + 1); + const context = lines.slice(start, end); + + results.push({ + file: file.name, + fullPath: file.path, + directory: file.directory, + lineNumber: i + 1, + line: line.trim(), + context: context.map((l, idx) => ({ + lineNumber: start + idx + 1, + text: l.trim(), + isMatch: start + idx === i, + })), + }); + } + } + } catch (readErr) { + // Ignorer les fichiers illisibles + console.error(`Cannot read file ${file.path}: ${readErr.message}`); + } + } + + return { + keyword, + totalResults: results.length, + results, + scannedPaths: getLogPaths(), + }; + } catch (err) { + throw new Error(`Search failed: ${err.message}`); + } +} + +/** + * Recherche des erreurs dans les logs récents + * @param {number} maxResults - Nombre maximum de résultats + * @returns {Promise} - Erreurs trouvées + */ +async function findRecentErrors(maxResults = 20) { + const errorPatterns = ['error', 'exception', 'failed', 'fatal', 'critical']; + const allErrors = []; + + try { + for (const pattern of errorPatterns) { + if (allErrors.length >= maxResults) break; + + const results = await searchLogs(pattern, maxResults - allErrors.length, 1); + allErrors.push(...results.results); + } + + // Dédupliquer par numéro de ligne et fichier + const unique = allErrors.filter( + (error, index, self) => + index === + self.findIndex( + (e) => e.fullPath === error.fullPath && e.lineNumber === error.lineNumber + ) + ); + + return { + totalErrors: unique.length, + errors: unique.slice(0, maxResults), + }; + } catch (err) { + throw new Error(`Failed to find errors: ${err.message}`); + } +} + +/** + * Lit tout le contenu d'un fichier de log spécifique + * @param {string} logFilePath - Chemin complet du fichier + * @returns {Promise} - Contenu du fichier + */ +async function readFullLog(logFilePath) { + try { + const content = await fs.readFile(logFilePath, 'utf8'); + const lines = content.split('\n').filter((line) => line.trim() !== ''); + + return { + file: path.basename(logFilePath), + fullPath: logFilePath, + totalLines: lines.length, + content: lines, + }; + } catch (err) { + throw new Error(`Failed to read log file: ${err.message}`); + } +} + +/** + * Obtient des statistiques sur les logs + * @returns {Promise} - Statistiques + */ +async function getLogStats() { + try { + const files = await listLogFiles(); + const totalSize = files.reduce((sum, file) => sum + file.size, 0); + + // Grouper par dossier + const byDirectory = {}; + files.forEach(file => { + const dir = file.directory; + if (!byDirectory[dir]) { + byDirectory[dir] = { + directory: dir, + count: 0, + totalSize: 0, + files: [], + }; + } + byDirectory[dir].count++; + byDirectory[dir].totalSize += file.size; + byDirectory[dir].files.push({ + name: file.name, + sizeMB: (file.size / (1024 * 1024)).toFixed(2), + modified: file.modified.toISOString(), + }); + }); + + return { + configuredPaths: getLogPaths(), + totalFiles: files.length, + totalSize, + totalSizeMB: (totalSize / (1024 * 1024)).toFixed(2), + oldestFile: files[files.length - 1]?.name, + newestFile: files[0]?.name, + byDirectory: Object.values(byDirectory).sort((a, b) => b.count - a.count), + }; + } catch (err) { + throw new Error(`Failed to get log stats: ${err.message}`); + } +} + +module.exports = { + listLogFiles, + findLatestLogFile, + readRecentLogs, + searchLogs, + findRecentErrors, + readFullLog, + getLogStats, +}; diff --git a/src/services/wms-query-service.js b/src/services/wms-query-service.js new file mode 100644 index 0000000..7421e67 --- /dev/null +++ b/src/services/wms-query-service.js @@ -0,0 +1,179 @@ +/** + * WMS Query Service + * Helper functions for building and executing LINQ queries via WMS API + */ + +const apiService = require('./api-service').getInstance(); +const constants = require('../config/constants'); + +/** + * Build a LINQ select expression + * @param {string} entityType - Entity type (Products, Containers, etc.) + * @param {string} selectFields - Fields to select (e.g., "z => new { z.Id, z.Name }") + * @param {string|null} filter - Optional filter (e.g., "z.Status == 'Active'") + * @param {number|null} limit - Optional limit + */ +/** + * Query WMS entities with LINQ expression + * @param {string} entityType - Entity type + * @param {string} selectExpression - LINQ select expression + * @param {string|null} filter - Optional filter + * @param {number} limit - Result limit + */ +async function queryEntities(entityType, selectExpression = 'z => z', filter = null, limit = 100) { + try { + // Enforce max limit + const maxLimit = parseInt(process.env.MAX_QUERY_ROWS) || 1000; + const actualLimit = Math.min(limit, maxLimit); + + // Build expression: Context + optional Where + OrderBy (required by EF when Take is used) + let expression = `Context.${entityType}`; + if (filter) { + const whereExpr = /^\s*\w+\s*=>/.test(filter) ? filter : `z => ${filter}`; + expression += `.Where(${whereExpr})`; + } + // OrderBy must be embedded in the expression (not as a separate API param) + expression += `.OrderBy(z => z.Id)`; + + console.error(`[WMSQuery] Querying ${entityType}: ${expression} | take=${actualLimit} select=${selectExpression}`); + + const result = await apiService.executeQuery(expression, { + take: actualLimit, + select: selectExpression !== 'z => z' ? selectExpression : undefined, + }); + + return { + entityType, + expression, + limit: actualLimit, + count: Array.isArray(result) ? result.length : 0, + data: result + }; + } catch (error) { + console.error(`[WMSQuery] Query failed:`, error.message); + throw new Error(`Query failed for ${entityType}: ${error.message}`); + } +} + +/** + * Query entity by ID + * @param {string} entityType - Entity type + * @param {string|number} id - Entity ID + */ +async function queryById(entityType, id) { + const filter = `z => z.Id == ${id}`; + const result = await queryEntities(entityType, 'z => z', filter, 1); + + if (!result.data || result.data.length === 0) { + throw new Error(`${entityType} with ID ${id} not found`); + } + + return result.data[0]; +} + +/** + * Search entities by keyword in common fields + * @param {string} entityType - Entity type + * @param {string} keyword - Search keyword + * @param {number} limit - Result limit + */ +async function searchEntities(entityType, keyword, limit = 50) { + // Common searchable fields by entity type + const searchFields = { + 'Products': ['Code', 'Description', 'Reference'], + 'Containers': ['Code', 'Reference'], + 'Tasks': ['Code', 'Reference'], + 'InboundOrders': ['Code', 'Reference'], + 'OutboundOrders': ['Code', 'Reference'], + 'Accounts': ['Code', 'Name'], + 'Suppliers': ['Code', 'Name'] + }; + + const fields = searchFields[entityType] || ['Code']; + + // Build filter for multiple fields (OR condition) + const conditions = fields.map(field => `z.${field}.Contains("${keyword}")`).join(' || '); + const filter = `z => ${conditions}`; + + try { + return await queryEntities(entityType, 'z => z', filter, limit); + } catch (error) { + // If Contains doesn't work, try simpler approach + console.error(`[WMSQuery] Search failed, trying alternative method:`, error.message); + return await queryEntities(entityType, 'z => z', null, limit); + } +} + +/** + * Get entity schema information (example entity to show available fields) + * @param {string} entityType - Entity type + */ +async function getEntitySchema(entityType) { + try { + // Query one entity to see its structure + const result = await queryEntities(entityType, 'z => z', null, 1); + + if (!result.data || result.data.length === 0) { + return { + entityType, + fields: [], + message: `No ${entityType} found to inspect schema` + }; + } + + const sample = result.data[0]; + const fields = Object.keys(sample).map(key => ({ + name: key, + type: typeof sample[key], + sample: sample[key] + })); + + return { + entityType, + fields, + totalFields: fields.length + }; + } catch (error) { + console.error(`[WMSQuery] Failed to get schema for ${entityType}:`, error.message); + throw error; + } +} + +/** + * Count entities with optional filter + * @param {string} entityType - Entity type + * @param {string|null} filter - Optional filter + */ +async function countEntities(entityType, filter = null) { + try { + // Build: Context.Entity.Where(...).Count() + const parts = [`Context.${entityType}`]; + if (filter) { + const whereExpr = /^\s*\w+\s*=>/.test(filter) ? filter : `z => ${filter}`; + parts.push(`Where(${whereExpr})`); + } + parts.push('Count()'); + const fullExpression = parts.join('.'); + + console.error(`[WMSQuery] Counting ${entityType}: ${fullExpression}`); + + const count = await apiService.executeScalarQuery(fullExpression); + + return { + entityType, + filter, + count + }; + } catch (error) { + console.error(`[WMSQuery] Count failed:`, error.message); + throw new Error(`Count failed for ${entityType}: ${error.message}`); + } +} + +module.exports = { + queryEntities, + queryById, + searchEntities, + getEntitySchema, + countEntities, +}; diff --git a/src/services/workflow-service.js b/src/services/workflow-service.js new file mode 100644 index 0000000..2545205 --- /dev/null +++ b/src/services/workflow-service.js @@ -0,0 +1,229 @@ +/** + * Workflow Service + * Handles workflow fetching with lazy loading and caching + * Workflows are only loaded when first requested (not at startup) + */ + +const apiService = require('./api-service').getInstance(); +const profileManager = require('../config/profile-manager'); + +// Cache state +let workflowCache = null; +let cacheTimestamp = null; +const CACHE_TTL = parseInt(process.env.WORKFLOW_CACHE_TTL) || 3600000; // 1 hour in milliseconds + +// Clear cache when profile changes — workflows are per-tenant, so the previous +// profile's cache is meaningless after a switch. +profileManager.onSwitch(() => clearCache()); + +/** + * Check if cache is still valid + */ +function isCacheValid() { + if (!workflowCache || !cacheTimestamp) { + return false; + } + + const now = Date.now(); + const age = now - cacheTimestamp; + return age < CACHE_TTL; +} + +/** + * Fetch all workflows from API with pagination + * Uses high page size (5000) to minimize API calls + */ +async function fetchAllWorkflows() { + // Check cache validity + if (isCacheValid()) { + console.error('[Workflow] Using cached data'); + return workflowCache; + } + + console.error('[Workflow] Cache expired or empty, fetching from API...'); + + try { + let allWorkflows = []; + let offset = 0; + const pageSize = parseInt(process.env.WORKFLOW_PAGE_SIZE) || 5000; + const profile = profileManager.getCurrent(); + const application = profile.application; + const tenant = profile.tenant; + + while (true) { + const body = [application, tenant, pageSize, offset]; + + console.error(`[Workflow] Fetching page: offset=${offset}, pageSize=${pageSize}`); + + // Use AD API (useAdApi=true) + const response = await apiService.post('/Workflow/GetByApplication', body, true); + + // Extract entities array from response + const workflows = response?.entities || []; + + // Check if response is valid + if (!workflows || workflows.length === 0) { + console.error('[Workflow] No more workflows to fetch'); + break; + } + + allWorkflows = allWorkflows.concat(workflows); + console.error(`[Workflow] Fetched ${workflows.length} workflows (total: ${allWorkflows.length})`); + + // If we got less than page size, we've reached the last page + if (workflows.length < pageSize) { + console.error('[Workflow] Last page reached'); + break; + } + + offset += pageSize; + } + + // Update cache + workflowCache = allWorkflows; + cacheTimestamp = Date.now(); + + console.error(`[Workflow] Successfully cached ${allWorkflows.length} workflows`); + return allWorkflows; + } catch (error) { + console.error('[Workflow] Error fetching workflows:', error.message); + throw new Error(`Failed to fetch workflows: ${error.message}`); + } +} + +/** + * Search workflows by query string + * @param {string} query - Search query (matches name, description, etc.) + * @param {string|null} category - Optional category filter + * @param {number} limit - Maximum results to return + */ +async function searchWorkflows(query, category = null, limit = 50) { + const workflows = await fetchAllWorkflows(); + + let results = workflows; + + // Filter by query if provided + if (query) { + const lowerQuery = query.toLowerCase(); + results = results.filter(w => { + const name = (w.name || w.Name || '').toLowerCase(); + const description = (w.description || w.Description || '').toLowerCase(); + const code = (w.code || w.Code || '').toLowerCase(); + + return name.includes(lowerQuery) || + description.includes(lowerQuery) || + code.includes(lowerQuery); + }); + } + + // Filter by category if provided + if (category) { + const lowerCategory = category.toLowerCase(); + results = results.filter(w => { + const wfCategory = (w.category || w.Category || '').toLowerCase(); + return wfCategory.includes(lowerCategory); + }); + } + + // Limit results + return results.slice(0, limit); +} + +/** + * Get workflow details by ID + * @param {string|number} workflowId - Workflow ID + */ +async function getWorkflowDetails(workflowId) { + const workflows = await fetchAllWorkflows(); + + // Try to find by Id, id, Code, code, Name, or name + const workflow = workflows.find(w => + w.id === workflowId || + w.Id === workflowId || + w.id === parseInt(workflowId) || + w.Id === parseInt(workflowId) || + w.Code === workflowId || + w.code === workflowId || + w.Name === workflowId || + w.name === workflowId + ); + + if (!workflow) { + throw new Error(`Workflow not found: ${workflowId}`); + } + + return workflow; +} + +/** + * List all workflow categories + */ +async function listWorkflowCategories() { + const workflows = await fetchAllWorkflows(); + + // Extract unique categories (try both lowercase and uppercase) + const categories = new Set(); + workflows.forEach(w => { + const category = w.category || w.Category; + if (category) { + categories.add(category); + } + }); + + // Sort alphabetically + return Array.from(categories).sort(); +} + +/** + * Get workflow statistics + */ +async function getWorkflowStats() { + const workflows = await fetchAllWorkflows(); + const categories = await listWorkflowCategories(); + + // Count workflows per category + const categoryCounts = {}; + workflows.forEach(w => { + const cat = w.category || w.Category || 'Uncategorized'; + categoryCounts[cat] = (categoryCounts[cat] || 0) + 1; + }); + + return { + total: workflows.length, + categories: categories.length, + categoryCounts, + cacheAge: cacheTimestamp ? Math.floor((Date.now() - cacheTimestamp) / 1000) : null + }; +} + +/** + * Clear workflow cache (force refresh on next request) + */ +function clearCache() { + workflowCache = null; + cacheTimestamp = null; + console.error('[Workflow] Cache cleared'); +} + +/** + * Get cache status + */ +function getCacheStatus() { + return { + cached: workflowCache !== null, + count: workflowCache ? workflowCache.length : 0, + timestamp: cacheTimestamp, + age: cacheTimestamp ? Math.floor((Date.now() - cacheTimestamp) / 1000) : null, + valid: isCacheValid() + }; +} + +module.exports = { + fetchAllWorkflows, + searchWorkflows, + getWorkflowDetails, + listWorkflowCategories, + getWorkflowStats, + clearCache, + getCacheStatus +}; diff --git a/src/tools/ad-tools.js b/src/tools/ad-tools.js new file mode 100644 index 0000000..7fd8eed --- /dev/null +++ b/src/tools/ad-tools.js @@ -0,0 +1,291 @@ +/** + * Application Dictionary Tools + * MCP tools for interacting with AD elements (Commands, Queries, Dialogs, Views, etc.) + */ + +const adService = require('../services/ad-service'); + +/** + * List available AD tools + */ +function listTools() { + return [ + { + name: 'get_application_summary', + description: 'Get summary of Application Dictionary elements. Shows count of cached elements per type (Commands, Queries, Dialogs, Views, etc.). Only counts already-loaded types to avoid long waits.', + inputSchema: { + type: 'object', + properties: {}, + }, + }, + { + name: 'get_ad_elements', + description: 'Get all elements of a specific type from Application Dictionary. Supports: Command, Query, Dialog, View, Entity, Event, Hook, Report, Dashboard, and 11 other types (20 total). Elements are lazy-loaded and cached for 1 hour.', + inputSchema: { + type: 'object', + properties: { + element_type: { + type: 'string', + description: 'Element type: Command, Query, Dialog, View, Entity, Event, FieldType, Hook, List, Record, Relationship, Report, Resource, Subscription, TimelineTemplate, Toggle, Validator, ViewGroup, Workflow, Dashboard', + }, + limit: { + type: 'number', + description: 'Maximum number of elements to return (default: 100, max: 1000)', + default: 100, + }, + }, + required: ['element_type'], + }, + }, + { + name: 'search_ad_elements', + description: 'Search Application Dictionary elements by name, description, or code. Searches within a specific element type.', + inputSchema: { + type: 'object', + properties: { + element_type: { + type: 'string', + description: 'Element type to search in', + }, + query: { + type: 'string', + description: 'Search query (matches name, description, code)', + }, + limit: { + type: 'number', + description: 'Maximum results (default: 50)', + default: 50, + }, + }, + required: ['element_type', 'query'], + }, + }, + { + name: 'get_ad_element_details', + description: 'Get detailed information about a specific AD element by ID or name', + inputSchema: { + type: 'object', + properties: { + element_type: { + type: 'string', + description: 'Element type', + }, + element_id: { + type: 'string', + description: 'Element ID or name', + }, + }, + required: ['element_type', 'element_id'], + }, + }, + { + name: 'list_ad_types', + description: 'List all available Application Dictionary element types', + inputSchema: { + type: 'object', + properties: {}, + }, + }, + ]; +} + +/** + * Execute AD tool + */ +async function executeTool(name, args) { + try { + switch (name) { + case 'get_application_summary': + return await getApplicationSummaryTool(args); + + case 'get_ad_elements': + return await getADElementsTool(args); + + case 'search_ad_elements': + return await searchADElementsTool(args); + + case 'get_ad_element_details': + return await getADElementDetailsTool(args); + + case 'list_ad_types': + return await listADTypesTool(args); + + default: + throw new Error(`Unknown AD tool: ${name}`); + } + } catch (error) { + console.error(`[ADTools] Error executing ${name}:`, error.message); + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: false, + error: error.message, + tool: name + }, null, 2) + }], + isError: true + }; + } +} + +/** + * Tool: get_application_summary + */ +async function getApplicationSummaryTool(args) { + console.error('[ADTools] Getting application summary'); + + const summary = adService.getApplicationSummary(); + + // Calculate totals + let totalCached = 0; + let totalElements = 0; + const cachedTypes = []; + const uncachedTypes = []; + + Object.entries(summary).forEach(([type, info]) => { + if (info.cached) { + totalCached++; + totalElements += info.count; + cachedTypes.push(type); + } else { + uncachedTypes.push(type); + } + }); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + summary: { + totalTypes: Object.keys(summary).length, + cachedTypes: totalCached, + uncachedTypes: uncachedTypes.length, + totalElements: totalElements + }, + elementCounts: summary, + cached: cachedTypes, + notCached: uncachedTypes + }, null, 2) + }] + }; +} + +/** + * Tool: get_ad_elements + */ +async function getADElementsTool(args) { + const { element_type, limit = 100 } = args; + + console.error(`[ADTools] Getting ${element_type} elements (limit: ${limit})`); + + const elements = await adService.getElements(element_type); + + // Limit results + const limitedElements = elements.slice(0, Math.min(limit, 1000)); + + // Map to simplified format + const mappedElements = limitedElements.map(e => ({ + id: e.id || e.Id, + name: e.name || e.Name, + description: e.description || e.Description, + code: e.code || e.Code, + // Include a few other common fields + validFrom: e.validFrom, + validTo: e.validTo, + versionId: e.versionId + })); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + elementType: element_type, + count: elements.length, + returned: mappedElements.length, + elements: mappedElements + }, null, 2) + }] + }; +} + +/** + * Tool: search_ad_elements + */ +async function searchADElementsTool(args) { + const { element_type, query, limit = 50 } = args; + + console.error(`[ADTools] Searching ${element_type}: query="${query}", limit=${limit}`); + + const results = await adService.searchElements(element_type, query, limit); + + // Map to simplified format + const mappedResults = results.map(e => ({ + id: e.id || e.Id, + name: e.name || e.Name, + description: e.description || e.Description, + code: e.code || e.Code + })); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + elementType: element_type, + query, + count: mappedResults.length, + elements: mappedResults + }, null, 2) + }] + }; +} + +/** + * Tool: get_ad_element_details + */ +async function getADElementDetailsTool(args) { + const { element_type, element_id } = args; + + console.error(`[ADTools] Getting ${element_type} details: ${element_id}`); + + const element = await adService.getElementDetails(element_type, element_id); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + elementType: element_type, + element + }, null, 2) + }] + }; +} + +/** + * Tool: list_ad_types + */ +async function listADTypesTool(args) { + console.error('[ADTools] Listing AD types'); + + const types = adService.getAvailableTypes(); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + count: types.length, + types + }, null, 2) + }] + }; +} + +module.exports = { + listTools, + executeTool, +}; diff --git a/src/tools/api-tools.js b/src/tools/api-tools.js new file mode 100644 index 0000000..57f646d --- /dev/null +++ b/src/tools/api-tools.js @@ -0,0 +1,185 @@ +const apiService = require('../services/api-service').getInstance(); + +/** + * Tools MCP pour interagir avec les APIs WMS + */ + +/** + * Liste des tools disponibles + * @returns {Array} - Liste des tools + */ +function listTools() { + return [ + { + name: 'call_query_api', + description: 'Appelle l\'API Query du WMS pour interroger des entités (Containers, Stocks, Tasks, Products, etc.)', + inputSchema: { + type: 'object', + properties: { + entity_type: { + type: 'string', + description: 'Type d\'entité (Containers, Stocks, ProductLocations, Tasks, Products, Accounts, Suppliers, Kits, Aliases, InboundOrders, Receptions, OutboundOrders)', + }, + expression: { + type: 'string', + description: 'Expression LINQ (ex: "z => z" pour tout, "z => z.Id" pour les IDs uniquement)', + default: 'z => z', + }, + filter: { + type: 'string', + description: 'Filtre LINQ optionnel (ex: "z.Id > 100")', + }, + limit: { + type: 'number', + description: 'Limite de résultats (défaut: 100)', + default: 100, + }, + }, + required: ['entity_type'], + }, + }, + { + name: 'execute_command', + description: 'Exécute une commande WMS (ATTENTION: peut modifier des données). Toujours récupérer la commande via get_ad_elements/get_ad_element_details avant d\'exécuter.', + inputSchema: { + type: 'object', + properties: { + command_name: { + type: 'string', + description: 'InternalCommandName exact tel que retourné par get_ad_element_details (ex: "Mecalux.ITSW.EasyWMS.Modules.MasterData.Contracts.Commands.SupplierCreateCommand"). Ne pas ajouter de suffix assembly — cela cause une FileLoadException.', + }, + properties: { + type: 'object', + description: 'Propriétés de la commande. Pour toute commande de création (Create), un champ Id de type GUID est requis et doit être généré à la volée (ex: crypto.randomUUID() ou uuidv4()). Ne jamais laisser Id vide ou null.', + }, + }, + required: ['command_name', 'properties'], + }, + }, + ]; +} + +/** + * Exécute un tool API + * @param {string} name - Nom du tool + * @param {Object} args - Arguments du tool + * @returns {Promise} - Résultat du tool + */ +async function executeTool(name, args) { + switch (name) { + case 'call_query_api': + return await callQueryAPI(args); + + case 'execute_command': + return await executeCommand(args); + + default: + throw new Error(`Unknown API tool: ${name}`); + } +} + +/** + * Tool: call_query_api + */ +async function callQueryAPI(args) { + const { entity_type, expression = 'z => z', filter, limit = 100 } = args; + + try { + // Expression = Context.Entity + optional Where + OrderBy (required by EF when Take is used) + let linqExpression = `Context.${entity_type}`; + if (filter) { + const whereExpr = /^\s*\w+\s*=>/.test(filter) ? filter : `z => ${filter}`; + linqExpression += `.Where(${whereExpr})`; + } + linqExpression += `.OrderBy(z => z.Id)`; + + const result = await apiService.executeQuery(linqExpression, { + take: limit || undefined, + select: expression !== 'z => z' ? expression : undefined, + }); + + return { + content: [ + { + type: 'text', + text: JSON.stringify( + { + success: true, + entityType: entity_type, + result, + }, + null, + 2 + ), + }, + ], + }; + } catch (err) { + return { + content: [ + { + type: 'text', + text: JSON.stringify( + { + success: false, + error: err.message, + }, + null, + 2 + ), + }, + ], + isError: true, + }; + } +} + +/** + * Tool: execute_command + */ +async function executeCommand(args) { + const { command_name, properties } = args; + + try { + const result = await apiService.executeCommand(command_name, properties); + + return { + content: [ + { + type: 'text', + text: JSON.stringify( + { + success: true, + command: command_name, + result, + }, + null, + 2 + ), + }, + ], + }; + } catch (err) { + return { + content: [ + { + type: 'text', + text: JSON.stringify( + { + success: false, + error: err.message, + }, + null, + 2 + ), + }, + ], + isError: true, + }; + } +} + +module.exports = { + listTools, + executeTool, +}; diff --git a/src/tools/config-tools.js b/src/tools/config-tools.js new file mode 100644 index 0000000..f441a12 --- /dev/null +++ b/src/tools/config-tools.js @@ -0,0 +1,151 @@ +/** + * Config Tools + * - get_system_parameters : read WMS configuration parameters and their + * per-warehouse values. + * + * The Reading model exposes configuration as two entities: + * - Parameter : the parameter definition + DefaultValue + * - ParamValue : per-warehouse overrides, linked to Parameter by ParameterId + * + * This tool fetches both (small datasets — a few hundred rows), merges them + * client-side, and reports the effective value for the requested warehouse. + */ + +const apiService = require('../services/api-service').getInstance(); + +function listTools() { + return [ + { + name: 'get_system_parameters', + description: `Read WMS configuration parameters (entité Parameter) and their per-warehouse +overrides (entité ParamValue). Returns, for each parameter, the effective value +for the requested warehouse — the warehouse override if one exists, otherwise the +default value. +Use this instead of a raw LINQ query — the "CommandParameterData" entity does NOT +exist in the Reading model; the correct entities are Parameter + ParamValue. + +Examples: +- get_system_parameters(warehouse="DOMBASLE") — all parameters with DOMBASLE values +- get_system_parameters(warehouse="DOMBASLE", param_class="Shipping") +- get_system_parameters(search="CROSSDOCK") — parameters whose code/description matches`, + inputSchema: { + type: 'object', + properties: { + warehouse: { + type: 'string', + description: 'Warehouse code to resolve effective values for (e.g. "DOMBASLE"). If omitted, all warehouse overrides are listed without picking an effective value.', + }, + param_class: { + type: 'string', + description: 'Optional filter on ParamClass (e.g. "Shipping", "Reception", "Putaway").', + }, + search: { + type: 'string', + description: 'Optional case-insensitive keyword matched against parameter Code and Description.', + }, + only_overridden: { + type: 'boolean', + description: 'If true, return only parameters that have at least one warehouse override (default: false).', + default: false, + }, + }, + }, + }, + ]; +} + +async function executeTool(name, args) { + switch (name) { + case 'get_system_parameters': + return await getSystemParameters(args); + default: + throw new Error(`Unknown config tool: ${name}`); + } +} + +async function getSystemParameters(args) { + const { warehouse, param_class, search, only_overridden = false } = args || {}; + + try { + // Both entities are small (a few hundred rows max) — fetch fully and merge + // client-side to avoid LINQ string-injection and null-field pitfalls. + const [parameters, paramValues] = await Promise.all([ + apiService.executeQuery('Context.Parameters.OrderBy(z => z.Id)', { take: 1000 }), + apiService.executeQuery('Context.ParamValues.OrderBy(z => z.Id)', { take: 1000 }), + ]); + + // Index overrides by ParameterId + const valuesByParam = {}; + for (const v of paramValues || []) { + const pid = v.ParameterId; + if (!pid) continue; + (valuesByParam[pid] = valuesByParam[pid] || []).push(v); + } + + const needle = search ? String(search).toLowerCase() : null; + + let rows = (parameters || []) + .filter(p => { + if (param_class && p.ParamClass !== param_class) return false; + if (needle) { + const hay = `${p.Code || ''} ${p.Description || ''}`.toLowerCase(); + if (!hay.includes(needle)) return false; + } + return true; + }) + .map(p => { + const overrides = (valuesByParam[p.Id] || []).map(v => ({ + warehouse: v.WarehouseCode, + value: v.Value, + })); + const whOverride = warehouse + ? overrides.find(o => o.warehouse === warehouse) + : null; + + return { + code: p.Code, + type: p.ParamType, + class: p.ParamClass, + scope: p.ParamScope, + isSystemParameter: p.IsSystemParameter, + isActive: p.IsActive, + description: p.Description, + defaultValue: p.DefaultValue, + effectiveValue: whOverride ? whOverride.value : p.DefaultValue, + overriddenForWarehouse: !!whOverride, + warehouseOverrides: overrides, + }; + }); + + if (only_overridden) { + rows = rows.filter(r => r.warehouseOverrides.length > 0); + } + + rows.sort((a, b) => String(a.code).localeCompare(String(b.code))); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + warehouse: warehouse || '(none — effective value = default)', + filters: { param_class: param_class || null, search: search || null, only_overridden }, + totalParameters: Array.isArray(parameters) ? parameters.length : 0, + totalOverrides: Array.isArray(paramValues) ? paramValues.length : 0, + returned: rows.length, + parameters: rows, + }, null, 2), + }], + }; + } catch (err) { + return { + content: [{ + type: 'text', + text: JSON.stringify({ success: false, error: err.message, tool: 'get_system_parameters' }, null, 2), + }], + isError: true, + }; + } +} + +module.exports = { listTools, executeTool }; diff --git a/src/tools/log-tools.js b/src/tools/log-tools.js new file mode 100644 index 0000000..9d32d8a --- /dev/null +++ b/src/tools/log-tools.js @@ -0,0 +1,216 @@ +const logService = require('../services/log-service'); + +/** + * Tools MCP pour interagir avec les logs + */ + +/** + * Liste des tools disponibles + * @returns {Array} - Liste des tools + */ +function listTools() { + return [ + { + name: 'read_recent_logs', + description: 'Lit les dernières lignes des fichiers de logs', + inputSchema: { + type: 'object', + properties: { + count: { + type: 'number', + description: 'Nombre de lignes à lire (défaut: 100)', + default: 100, + }, + log_file: { + type: 'string', + description: 'Nom du fichier de log spécifique (optionnel, prend le plus récent par défaut)', + }, + }, + }, + }, + { + name: 'list_log_files', + description: 'Liste tous les fichiers de logs disponibles sous LOGS_PATH avec leur taille et date de modification', + inputSchema: { + type: 'object', + properties: {}, + }, + }, + { + name: 'search_logs', + description: 'Recherche un mot-clé dans les fichiers de logs avec contexte', + inputSchema: { + type: 'object', + properties: { + keyword: { + type: 'string', + description: 'Mot-clé à rechercher', + }, + max_results: { + type: 'number', + description: 'Nombre maximum de résultats (défaut: 50)', + default: 50, + }, + context_lines: { + type: 'number', + description: 'Nombre de lignes de contexte avant/après (défaut: 2)', + default: 2, + }, + }, + required: ['keyword'], + }, + }, + ]; +} + +/** + * Exécute un tool log + * @param {string} name - Nom du tool + * @param {Object} args - Arguments du tool + * @returns {Promise} - Résultat du tool + */ +async function executeTool(name, args) { + switch (name) { + case 'list_log_files': + return await listLogFiles(args); + + case 'read_recent_logs': + return await readRecentLogs(args); + + case 'search_logs': + return await searchLogs(args); + + default: + throw new Error(`Unknown log tool: ${name}`); + } +} + +/** + * Tool: list_log_files + */ +async function listLogFiles() { + try { + const files = await logService.listLogFiles(); + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + totalFiles: files.length, + files: files.map(f => ({ + name: f.name, + relativePath: f.relativePath, + sizeMB: (f.size / (1024 * 1024)).toFixed(2), + modified: f.modified.toISOString(), + })), + }, null, 2), + }], + }; + } catch (err) { + return { + content: [{ + type: 'text', + text: JSON.stringify({ success: false, error: err.message }, null, 2), + }], + isError: true, + }; + } +} + +/** + * Tool: read_recent_logs + */ +async function readRecentLogs(args) { + const { count = 100, log_file } = args; + + try { + const result = await logService.readRecentLogs(count, log_file); + + return { + content: [ + { + type: 'text', + text: JSON.stringify( + { + success: true, + file: result.file, + totalLines: result.totalLines, + returnedLines: result.returnedLines, + lines: result.lines, + }, + null, + 2 + ), + }, + ], + }; + } catch (err) { + return { + content: [ + { + type: 'text', + text: JSON.stringify( + { + success: false, + error: err.message, + }, + null, + 2 + ), + }, + ], + isError: true, + }; + } +} + +/** + * Tool: search_logs + */ +async function searchLogs(args) { + const { keyword, max_results = 50, context_lines = 2 } = args; + + try { + const result = await logService.searchLogs(keyword, max_results, context_lines); + + return { + content: [ + { + type: 'text', + text: JSON.stringify( + { + success: true, + keyword: result.keyword, + totalResults: result.totalResults, + results: result.results, + }, + null, + 2 + ), + }, + ], + }; + } catch (err) { + return { + content: [ + { + type: 'text', + text: JSON.stringify( + { + success: false, + error: err.message, + }, + null, + 2 + ), + }, + ], + isError: true, + }; + } +} + +module.exports = { + listTools, + executeTool, +}; diff --git a/src/tools/metadata-tools.js b/src/tools/metadata-tools.js new file mode 100644 index 0000000..25304fc --- /dev/null +++ b/src/tools/metadata-tools.js @@ -0,0 +1,201 @@ +/** + * Metadata & GenericSearch Tools + * - get_entity_metadata : list queryable entities and their properties (Metadata API) + * - generic_search : full-text search across indexed WMS documents (GenericSearch API) + */ + +const apiService = require('../services/api-service').getInstance(); + +function listTools() { + return [ + { + name: 'get_entity_metadata', + description: `Get metadata for WMS entities — field names, types, and assembly info — without querying actual data. +Use this to discover the exact field names and types for any entity before building a filter. +- Without entity_name: lists all queryable entities +- With entity_name (partial match ok, case-insensitive): returns field names + types for that entity`, + inputSchema: { + type: 'object', + properties: { + entity_name: { + type: 'string', + description: 'Partial entity name to look up (e.g. "OutboundOrder", "Task", "Stock"). Omit to list all entities.', + }, + }, + }, + }, + { + name: 'generic_search', + description: `Full-text search across indexed WMS documents (faster than LINQ for keyword searches). +First call without arguments to get available categories, then search within them. +Examples: +- generic_search(query="ORD-2024-001") — find an order by code +- generic_search(query="picking error", categories=["Tasks"]) — search tasks +- generic_search() — list available search categories`, + inputSchema: { + type: 'object', + properties: { + query: { + type: 'string', + description: 'Search keyword or phrase', + }, + categories: { + type: 'array', + items: { type: 'string' }, + description: 'Document categories to search (omit to search all). Get available categories by calling without query.', + }, + limit: { + type: 'number', + description: 'Max results (default: 20)', + default: 20, + }, + skip: { + type: 'number', + description: 'Offset for pagination (default: 0)', + default: 0, + }, + }, + }, + }, + ]; +} + +async function executeTool(name, args) { + switch (name) { + case 'get_entity_metadata': + return await getEntityMetadata(args); + case 'generic_search': + return await genericSearch(args); + default: + throw new Error(`Unknown metadata tool: ${name}`); + } +} + +async function getEntityMetadata(args) { + const { entity_name } = args || {}; + + try { + const entities = await apiService.getMetadataEntities(); + + if (!entity_name) { + // Return full entity list + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + totalEntities: Array.isArray(entities) ? entities.length : '?', + entities, + }, null, 2), + }], + }; + } + + // Find matching entities (case-insensitive partial match) + const search = entity_name.toLowerCase(); + const matches = Array.isArray(entities) + ? entities.filter(e => { + const name = (e.FullName || e.Name || e.fullName || e.name || JSON.stringify(e)).toLowerCase(); + return name.includes(search); + }) + : []; + + if (matches.length === 0) { + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: false, + error: `No entity matching "${entity_name}" found`, + availableCount: Array.isArray(entities) ? entities.length : '?', + hint: 'Call get_entity_metadata without entity_name to see all entities', + }, null, 2), + }], + isError: true, + }; + } + + // Fetch properties for each match (up to 3) + const results = []; + for (const entity of matches.slice(0, 3)) { + const assemblyFullName = entity.AssemblyFullName || entity.assemblyFullName; + const fullName = entity.FullName || entity.fullName; + + let properties = null; + if (assemblyFullName && fullName) { + try { + properties = await apiService.getEntityProperties(assemblyFullName, fullName); + } catch (err) { + console.error(`[Metadata] Could not fetch properties for ${fullName}: ${err.message}`); + } + } + + results.push({ entity, properties }); + } + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + query: entity_name, + matchCount: matches.length, + results, + }, null, 2), + }], + }; + } catch (err) { + return { + content: [{ + type: 'text', + text: JSON.stringify({ success: false, error: err.message }, null, 2), + }], + isError: true, + }; + } +} + +async function genericSearch(args) { + const { query, categories = [], limit = 20, skip = 0 } = args || {}; + + try { + // No query: return available categories + if (!query) { + const cats = await apiService.getSearchCategories(); + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + availableCategories: cats, + hint: 'Pass query + optional categories[] to search', + }, null, 2), + }], + }; + } + + const result = await apiService.genericSearch(query, categories, limit, skip); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + query, + categories: categories.length > 0 ? categories : 'all', + result, + }, null, 2), + }], + }; + } catch (err) { + return { + content: [{ + type: 'text', + text: JSON.stringify({ success: false, error: err.message }, null, 2), + }], + isError: true, + }; + } +} + +module.exports = { listTools, executeTool }; diff --git a/src/tools/profile-tools.js b/src/tools/profile-tools.js new file mode 100644 index 0000000..2e7d14a --- /dev/null +++ b/src/tools/profile-tools.js @@ -0,0 +1,164 @@ +/** + * Profile Management Tools + * Let Claude list, inspect, and switch the active WMS profile at runtime. + * + * On switch: api-service resets its OAuth token, workflow-service/ad-service + * clear their caches. The next API call re-authenticates against the new host + * with the new tenant/credentials. + */ + +const profileManager = require('../config/profile-manager'); + +function listTools() { + return [ + { + name: 'list_wms_profiles', + description: 'List all WMS profiles configured in .env (AD, LIMAGRAIN, ...) with their host and tenant. Use this to see which WMS backends are available.', + inputSchema: { + type: 'object', + properties: {}, + }, + }, + { + name: 'get_current_wms_profile', + description: 'Return the currently active WMS profile (name, host, tenant, application). If no profile is active, returns an error explaining that switch_wms_profile must be called first.', + inputSchema: { + type: 'object', + properties: {}, + }, + }, + { + name: 'switch_wms_profile', + description: 'Switch the active WMS profile. Resets the OAuth token and clears workflow/AD caches so the next API call targets the new backend. Use list_wms_profiles to see valid names.', + inputSchema: { + type: 'object', + properties: { + profile: { + type: 'string', + description: 'Profile name (case-sensitive), e.g. "AD" or "LIMAGRAIN".', + }, + }, + required: ['profile'], + }, + }, + ]; +} + +async function executeTool(name, args) { + switch (name) { + case 'list_wms_profiles': + return listProfilesTool(); + case 'get_current_wms_profile': + return getCurrentProfileTool(); + case 'switch_wms_profile': + return switchProfileTool(args); + default: + throw new Error(`Unknown profile tool: ${name}`); + } +} + +function summarize(profile) { + return { + name: profile.name, + host: profile.host, + tenant: profile.tenant, + username: profile.username, + application: profile.application, + saas: profile.saas, + logsAvailable: !profile.saas, + apiBaseUrl: profile.apiBaseUrl, + tokenUrl: profile.tokenUrl, + workflowApiBase: profile.workflowApiBase, + }; +} + +function listProfilesTool() { + const names = profileManager.listProfiles(); + const current = profileManager.getCurrentName(); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + current, + profiles: names, + hint: current + ? `Active profile: ${current}. Call switch_wms_profile to change.` + : 'No profile active. Call switch_wms_profile with one of the names above before any WMS API call.', + }, null, 2), + }], + }; +} + +function getCurrentProfileTool() { + try { + const profile = profileManager.getCurrent(); + return { + content: [{ + type: 'text', + text: JSON.stringify({ success: true, profile: summarize(profile) }, null, 2), + }], + }; + } catch (err) { + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: false, + error: err.message, + profiles: profileManager.listProfiles(), + }, null, 2), + }], + isError: true, + }; + } +} + +function switchProfileTool(args) { + const { profile } = args || {}; + if (!profile) { + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: false, + error: 'Missing "profile" argument', + profiles: profileManager.listProfiles(), + }, null, 2), + }], + isError: true, + }; + } + + try { + const previous = profileManager.getCurrentName(); + const next = profileManager.switchTo(profile); + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + previous, + current: next.name, + profile: summarize(next), + note: 'OAuth token and workflow/AD caches have been cleared. Next API call will re-authenticate.', + }, null, 2), + }], + }; + } catch (err) { + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: false, + error: err.message, + profiles: profileManager.listProfiles(), + }, null, 2), + }], + isError: true, + }; + } +} + +module.exports = { listTools, executeTool }; diff --git a/src/tools/wms-query-tools.js b/src/tools/wms-query-tools.js new file mode 100644 index 0000000..ed9fbdd --- /dev/null +++ b/src/tools/wms-query-tools.js @@ -0,0 +1,275 @@ +/** + * WMS Query Tools + * MCP tools for querying WMS entities via LINQ expressions + */ + +const wmsQueryService = require('../services/wms-query-service'); + +/** + * List available WMS query tools + */ +function listTools() { + return [ + { + name: 'query_wms_entities', + description: `Query WMS entities using LINQ expressions. Returns rows (up to 1000). +Uses QueryExecute with QueryType=Reading — status fields are STRINGS (enum names, not integers). +Common entities: Products, Containers, Tasks, Stocks, ProductLocations, Location, InboundOrders, OutboundOrders, Receptions, Accounts, Suppliers, Kits, Aliases. + +IMPORTANT — before building a filter with a status/enum field: +1. Check docs first: read resource docs://entities/ (e.g. easywms_reading_entites_outboundorder_OutboundOrderStatus for OutboundOrders) +2. If no doc found: call get_ad_elements(element_type="Entity", search=entity_name) +3. Last resort: call get_entity_metadata(entity_name=...) to get field names +Never guess enum string values — they differ between Reading and Writing models.`, + inputSchema: { + type: 'object', + properties: { + entity_type: { + type: 'string', + description: 'Entity type (Products, Containers, Tasks, Stocks, ProductLocations, InboundOrders, OutboundOrders, Accounts, Suppliers, Kits, Aliases, Receptions)', + }, + select_expression: { + type: 'string', + description: 'LINQ select expression (default: "z => z" for all fields, or "z => new { z.Id, z.Name }" for specific fields)', + default: 'z => z', + }, + filter: { + type: 'string', + description: 'Optional LINQ filter (e.g., "z => z.Id > 100" or "z => z.Status == \'Active\'")', + }, + limit: { + type: 'number', + description: 'Maximum results to return (default: 100, max: 1000)', + default: 100, + }, + }, + required: ['entity_type'], + }, + }, + { + name: 'get_entity_schema', + description: 'Get the schema/structure of a WMS entity by querying one sample record', + inputSchema: { + type: 'object', + properties: { + entity_type: { + type: 'string', + description: 'Entity type to inspect', + }, + }, + required: ['entity_type'], + }, + }, + { + name: 'count_wms_entities', + description: `PREFERRED TOOL for counting ("combien", "nombre de", "how many"). Uses QueryScalarExecute → Reading model. Never adds Take(), safe on all entity types. +IMPORTANT: Always use this tool first for any counting question — do not use query_wms_entities for counts. + +IMPORTANT — enum/status values MUST be verified before use. Reading model uses string enum names, NOT integers. +Lookup order for enum values: +1. Read the relevant doc: docs://entities/ (e.g. easywms_reading_entites_outboundorder_OutboundOrderStatus for OutboundOrders) +2. If no doc: call get_ad_elements(element_type="Entity", search=entity_name) +3. Last resort: call get_entity_metadata(entity_name=...) — gives field names but not all enum values +Never hardcode enum values without checking — Reading vs Writing model distinction has caused bugs before. + +Verified values (curl-tested): +- Tasks actives: filter='z.TaskStatus == "InProcess" || z.TaskStatus == "Pending"' +- Tasks en cours: filter='z.TaskStatus == "InProcess"' +- Tasks en attente: filter='z.TaskStatus == "Pending"' +- ODS lancés: filter='z.OutboundOrderStatus == "Release"' +- OS incomplètes actives: filter='z.IncompleteOrder == true && z.IsActive == true' + (par classe: ajouter && z.OutboundClassCode == "X") +- Containers bloquants: filter='z.NumContainerPendingTasks > 0' + (sur un emplacement: ajouter && z.LocationCode == "X")`, + inputSchema: { + type: 'object', + properties: { + entity_type: { + type: 'string', + description: 'Entity type (Products, Containers, Tasks, Stocks, OutboundOrders, InboundOrders, etc.)', + }, + filter: { + type: 'string', + description: 'Optional LINQ filter condition. Status fields are strings (enum names from Reading model). Always verify enum values via docs://entities/ before use.', + }, + }, + required: ['entity_type'], + }, + }, + { + name: 'search_wms_data', + description: 'Search for a keyword across multiple WMS entities', + inputSchema: { + type: 'object', + properties: { + keyword: { + type: 'string', + description: 'Keyword to search for', + }, + entity_types: { + type: 'array', + items: { type: 'string' }, + description: 'List of entity types to search in (default: Products, Containers, Tasks)', + }, + limit: { + type: 'number', + description: 'Maximum results per entity (default: 50)', + default: 50, + }, + }, + required: ['keyword'], + }, + }, + ]; +} + +/** + * Execute WMS query tool + */ +async function executeTool(name, args) { + try { + switch (name) { + case 'query_wms_entities': + return await queryWmsEntities(args); + + case 'count_wms_entities': + return await countWmsEntities(args); + + case 'get_entity_schema': + return await getEntitySchema(args); + + case 'search_wms_data': + return await searchWmsData(args); + + default: + throw new Error(`Unknown WMS query tool: ${name}`); + } + } catch (error) { + console.error(`[WMSQueryTools] Error executing ${name}:`, error.message); + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: false, + error: error.message, + tool: name + }, null, 2) + }], + isError: true + }; + } +} + +/** + * Tool: query_wms_entities + */ +async function queryWmsEntities(args) { + const { entity_type, select_expression = 'z => z', filter, limit = 100 } = args; + + console.error(`[WMSQueryTools] Querying ${entity_type}: limit=${limit}`); + + const result = await wmsQueryService.queryEntities( + entity_type, + select_expression, + filter, + limit + ); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + ...result + }, null, 2) + }] + }; +} + +/** + * Tool: count_wms_entities + */ +async function countWmsEntities(args) { + const { entity_type, filter } = args; + + console.error(`[WMSQueryTools] Counting ${entity_type}${filter ? ` where ${filter}` : ''}`); + + const result = await wmsQueryService.countEntities(entity_type, filter || null); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + ...result + }, null, 2) + }] + }; +} + +/** + * Tool: get_entity_schema + */ +async function getEntitySchema(args) { + const { entity_type } = args; + + console.error(`[WMSQueryTools] Getting schema for ${entity_type}`); + + const result = await wmsQueryService.getEntitySchema(entity_type); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + ...result + }, null, 2) + }] + }; +} + +/** + * Tool: search_wms_data + */ +async function searchWmsData(args) { + const { keyword, entity_types = ['Products', 'Containers', 'Tasks'], limit = 50 } = args; + + console.error(`[WMSQueryTools] Searching for "${keyword}" in ${entity_types.join(', ')}`); + + const results = {}; + let totalFound = 0; + + for (const entityType of entity_types) { + try { + const result = await wmsQueryService.searchEntities(entityType, keyword, limit); + results[entityType] = { + count: result.count, + data: result.data + }; + totalFound += result.count; + } catch (error) { + console.error(`[WMSQueryTools] Search failed for ${entityType}:`, error.message); + results[entityType] = { + error: error.message, + count: 0 + }; + } + } + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + keyword, + totalFound, + results + }, null, 2) + }] + }; +} + +module.exports = { + listTools, + executeTool, +}; diff --git a/src/tools/workflow-tools.js b/src/tools/workflow-tools.js new file mode 100644 index 0000000..1f36f14 --- /dev/null +++ b/src/tools/workflow-tools.js @@ -0,0 +1,175 @@ +/** + * Workflow Tools + * MCP tools for searching and retrieving workflow information via API + */ + +const workflowService = require('../services/workflow-service'); + +/** + * List available workflow tools + */ +function listTools() { + return [ + { + name: 'search_workflows', + description: 'Search workflows by name, description, or code. Returns matching workflows with metadata. Workflows are lazy-loaded from API on first request and cached for 1 hour.', + inputSchema: { + type: 'object', + properties: { + query: { + type: 'string', + description: 'Search query (searches in name, description, code)', + }, + category: { + type: 'string', + description: 'Filter by workflow category/application', + }, + limit: { + type: 'number', + description: 'Maximum results to return (default: 50)', + default: 50, + }, + }, + }, + }, + { + name: 'get_workflow_details', + description: 'Get full details of a specific workflow by ID or code', + inputSchema: { + type: 'object', + properties: { + workflow_id: { + type: 'string', + description: 'Workflow ID or code', + }, + }, + required: ['workflow_id'], + }, + }, + { + name: 'list_workflow_categories', + description: 'List all available workflow categories', + inputSchema: { + type: 'object', + properties: {}, + }, + }, + ]; +} + +/** + * Execute workflow tool + */ +async function executeTool(name, args) { + try { + switch (name) { + case 'search_workflows': + return await searchWorkflows(args); + + case 'get_workflow_details': + return await getWorkflowDetails(args); + + case 'list_workflow_categories': + return await listWorkflowCategories(args); + + default: + throw new Error(`Unknown workflow tool: ${name}`); + } + } catch (error) { + console.error(`[WorkflowTools] Error executing ${name}:`, error.message); + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: false, + error: error.message, + tool: name + }, null, 2) + }], + isError: true + }; + } +} + +/** + * Tool: search_workflows + */ +async function searchWorkflows(args) { + const { query, category, limit = 50 } = args; + + console.error(`[WorkflowTools] Searching workflows: query="${query}", category="${category}", limit=${limit}`); + + const results = await workflowService.searchWorkflows(query, category, limit); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + count: results.length, + workflows: results.map(w => ({ + id: w.Id, + code: w.Code, + name: w.Name, + category: w.Category, + description: w.Description, + version: w.Version, + created: w.Created, + modified: w.Modified + })) + }, null, 2) + }] + }; +} + +/** + * Tool: get_workflow_details + */ +async function getWorkflowDetails(args) { + const { workflow_id } = args; + + console.error(`[WorkflowTools] Getting workflow details: ${workflow_id}`); + + const workflow = await workflowService.getWorkflowDetails(workflow_id); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + workflow + }, null, 2) + }] + }; +} + +/** + * Tool: list_workflow_categories + */ +async function listWorkflowCategories(args) { + console.error('[WorkflowTools] Listing workflow categories'); + + const categories = await workflowService.listWorkflowCategories(); + const stats = await workflowService.getWorkflowStats(); + + return { + content: [{ + type: 'text', + text: JSON.stringify({ + success: true, + totalCategories: categories.length, + categories, + stats: { + totalWorkflows: stats.total, + categoryCounts: stats.categoryCounts, + cacheAge: stats.cacheAge + } + }, null, 2) + }] + }; +} + +module.exports = { + listTools, + executeTool, +}; diff --git a/temp/workflow_CST_UDM_AddProductStock_v10_1770647867592.json b/temp/workflow_CST_UDM_AddProductStock_v10_1770647867592.json new file mode 100644 index 0000000..5e7319c --- /dev/null +++ b/temp/workflow_CST_UDM_AddProductStock_v10_1770647867592.json @@ -0,0 +1,1409 @@ +{ + "$id": "Workflow-CST_UDM_AddProductStock-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}.EasyBpart", + "$type": "Mecalux.ITSW.EasyBuilder.Workflow, Mecalux.ITSW.EasyBuilder.Model", + "AttributesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-container", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "9b228d3d-1d2a-4457-9754-7b2018dd57cc", + "EntityStereotypeName": "ContainerWF", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "9c023783-2508-4b12-bd98-82bd3913c83c", + "InitialValue": "", + "Length": 100, + "Name": "container", + "Persist": true, + "Stereotype": "Record" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "cc10a82e-49db-4d28-af1c-4e2d8d77b37f", + "InitialValue": "", + "Length": 100, + "Name": "ContainerDivisionType", + "Persist": true, + "Stereotype": "String" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "68210308-df67-4f24-849b-8ff83fafb5e7", + "InitialValue": "0", + "Length": 100, + "Name": "i", + "Persist": true, + "Stereotype": "Integer" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Code entrepot", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "95a9b5ed-8968-4c78-862e-8c8ba394f5b2", + "InitialValue": "", + "Length": 100, + "Name": "WarehouseCode", + "Persist": true, + "Stereotype": "String" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "16d9c67a-1927-4358-9a2e-6561dd00325c", + "InitialValue": "", + "Length": 100, + "Name": "WSC", + "Persist": true, + "Stereotype": "String" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-wscList", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "00f6f18a-1cc5-44b4-9352-bd9fbdf227ad", + "Guid": "2241e9ab-7b85-4c52-8be0-0345bab52105", + "InitialValue": "", + "Length": 100, + "Name": "wscList", + "Persist": true, + "Stereotype": "List" + } + ] + }, + "ActivitiesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivity, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err Cant Read WSC", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "throw new InvalidOperationException(ProcessContext.Resources.GetString(\"CST_Json_reading_error\"));", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "b7390b1f-25f9-4725-a9d8-d19506f86bc4", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Err Cant Read WSC", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Width": 48, + "X": 26, + "Y": 2 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "throw new InvalidOperationException(ProcessContext.ProcessInfo.LastExceptionMessage);", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "c68f831c-553f-4f43-a4ca-c1dd4b840f03", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Err. Cant Create Stock", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Width": 48, + "X": 266, + "Y": 98 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i++", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "i++; #:ContainerDivisionType = string.Empty;", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "4d7b9c0e-a6ae-4783-978a-05f8ed2144c4", + "Name": "ContainerDivisionType", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "e6f2a17b-7192-44f4-8d84-c52496356506", + "Name": "i", + "UseType": "Attribute" + } + ] + }, + "Guid": "01a1cd18-3faf-4c00-91a0-0d311f49a08d", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "i++", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i++-Does_it_need_an_MLD_check-Again-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "i < wscList.Count()", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 90, + "Y": 314 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 31.66, + "Y": 313.18 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 36.14, + "Y": 110.63 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 92.86, + "Y": 111.43 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does it need an MLD check", + "ExceptionRollback": false, + "Guid": "8cd36194-b6fe-4024-abd5-d44b87c28b01", + "Name": "Again", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 302 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-JSON Decoder", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "// NewtonSoft #:Newtonsoft.Json.Linq.JArray jsonComplet = Newtonsoft.Json.Linq.JArray.Parse(WSC_string); #: #:var jetonStock = jsonComplet[0][\"Stocks\"]?[\"Stock\"]; #: #:if (jetonStock != null) #:{ #:wscList = jetonStock.ToObject(); #: #:}", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "56430350-f95d-4529-8834-57f5ad422d6b", + "Name": "WSC_string", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-wscList" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "89e14cc7-b31d-40d4-9e90-0862341e8e48", + "Name": "wscList", + "UseType": "Attribute" + } + ] + }, + "Guid": "1ee2a0c5-47f0-46da-86b7-fd37839ce743", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Initiator", + "Limit": 0, + "Name": "JSON Decoder", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-JSON_Decoder-Get_Warehouse_Code-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 26 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 54 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Warehouse Code", + "ExceptionRollback": false, + "Guid": "6a997af9-4e13-4835-b506-aa006dd27345", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-JSON_Decoder-Err_Cant_Read_WSC-WSC empty-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "String.IsNullOrWhiteSpace(WSC) && !wscList.Any()", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 90, + "Y": 14 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 73.9999161, + "Y": 13.9979248 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err Cant Read WSC", + "ExceptionRollback": false, + "Guid": "d3460178-7480-4a29-b2ac-44cda165e5ca", + "Name": "WSC empty", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 2 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Container", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCommandActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerCode", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-Code", + "Guid": "d5c229b8-ee82-456f-8d19-c670a4217f57", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "Guid.NewGuid()", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-ComponentId", + "Guid": "ba0aaafb-3b3a-4885-bcaa-3975578e4ba3", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerTypeCode", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-ContainerTypeCode", + "Guid": "48bbe3c5-e4df-40b0-bebe-5487a639594b", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-DivisionTypeCode", + "Guid": "96b3c50a-e3e6-4378-831d-cebba0d3a043", + "Name": "NoName", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).LocationCode", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-LocationCode", + "Guid": "ccd6dfa9-37cf-4a0c-af2b-37fb58cb6e09", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-WarehouseCode", + "Guid": "6ddc9df8-7d5f-4615-bcb6-87c0f523b86d", + "Name": "NoName", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "1", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-X", + "Guid": "38ee46af-4808-4398-a6d9-7036dbdde5f3", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "1", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-Y", + "Guid": "6c319812-e7e9-484a-a5b0-b5e6ce180e60", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "b6d3b100-f762-48a3-bb27-06a706e64bbf", + "Height": 24, + "ImplementationInternal": "Command-ContainerCreateOnLocationCommand-{f719cc88-caeb-48c2-91d7-ba678811be67}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Create Container", + "OperationName": "", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create_Container-Create_Stock-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Stock", + "ExceptionRollback": false, + "Guid": "91e594cd-d414-4b26-8981-e6c4fecedc7f", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 130, + "Y": 190 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Stock", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCommandActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-ContainerCode", + "Guid": "359da701-056a-49bc-9489-8874d9e426c1", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt01 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute1", + "Guid": "dab2551f-12e8-4a46-b446-408993c5a693", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt10 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute10", + "Guid": "ef5f0be6-03f1-41ff-8c7f-42f6bbdc7b74", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt11 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute11", + "Guid": "25542587-2f7e-462b-b381-f5caec7a94fc", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt12 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute12", + "Guid": "b731f044-97f4-4bff-9ee9-34f84b77e9ca", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt13 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute13", + "Guid": "ea78d2da-c528-4f17-aaf1-5c8edc566e67", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt14 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute14", + "Guid": "0eabc9c6-d7df-4a52-9e61-7dd52764057f", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt15 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute15", + "Guid": "8b7710e3-6604-4293-85ca-dba82f14e853", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt16 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute16", + "Guid": "6a93506b-df6e-4363-a14e-e4c0b27ee5d8", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt17 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute17", + "Guid": "7b688db8-5161-44be-a91e-53c4371affa1", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt18 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute18", + "Guid": "b65bbe13-412d-4da0-b63b-b26a691d3440", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt19 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute19", + "Guid": "4ab9bf24-0aee-4508-ab73-56e11f380442", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt02 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute2", + "Guid": "7a942bc5-ffc2-40e1-96cf-efa943853385", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt20 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute20", + "Guid": "345ecf9a-d589-47de-977f-a2ddd89f90e1", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt03 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute3", + "Guid": "06409dd1-e76e-4758-a991-edeacef804b2", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt04 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute4", + "Guid": "2e30de1e-e21e-4ad7-8961-97699ed25f38", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt05 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute5", + "Guid": "6b8cbf1e-1192-41fd-a3b8-cb267eae3c08", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt06 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute6", + "Guid": "903f215b-1742-4bf1-a62d-4359cb1fadb5", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt07 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute7", + "Guid": "095ea9cb-cd2b-452a-b8db-a0a3c20e2f9d", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt08 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute8", + "Guid": "4ca27442-3f6d-4cc6-8cff-85b5c12bf9b2", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt09 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute9", + "Guid": "809bd4ea-582c-4326-b847-3e576a44291a", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerDivisionCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-DivisionCode", + "Guid": "b62bbd7d-147b-4dac-8463-496fc638cddc", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).LocationCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LocationCode", + "Guid": "bb2cd6ba-af3d-4f81-8920-cb03591f2e5b", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttBBDate", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.BestBeforeDate", + "Guid": "1e20a0ee-c2e1-469a-b346-3636a1407ede", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttColor ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Colour", + "Guid": "18584125-708c-47d9-b225-873345cf7fad", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttDaysLife", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.DaysOfLife", + "Guid": "252eff93-22bb-45f7-9fcf-88c936e08e66", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttExpDate", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.ExpirationDate", + "Guid": "6a5e318d-29ee-4968-9fba-4bc1a9302245", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttLot ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.LotCode", + "Guid": "acfab2b4-8947-45cc-989e-c795aa7f937e", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttPostTreat ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.PostProductionTreatment", + "Guid": "968ddd97-8959-45a1-9f99-393ed9dcbd89", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttProdDate", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.ProductionDate", + "Guid": "2cb71aad-fa2e-458e-8c87-069729c3fc59", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttProdMethod ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.ProductionMethod", + "Guid": "e7cffcc1-2b2b-4e3a-a144-e81d7eab03fc", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttQuality ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Quality", + "Guid": "1ef5d3ff-c5c8-48a3-ad61-cad72656ede2", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttSN ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.SerialNumber", + "Guid": "0ac1c3a7-9fee-445d-9302-f4685b6e1aeb", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttSize ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Size", + "Guid": "06fc60a3-b98b-480c-8a8d-2902e48a05e3", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttSize ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Source", + "Guid": "d9b78ca7-3913-417f-96b0-457e9d03b16d", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttVersion ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Version", + "Guid": "38afa668-76ca-489c-a23d-e6f194225923", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).OwnerCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-OwnerCode", + "Guid": "1852e951-0398-4fae-b94d-83b6576f6c30", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ItemCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-ProductCode", + "Guid": "fc7b15c7-2459-4e87-a631-0aa7f2355fdf", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Quantity", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-Quantity", + "Guid": "93056d3d-61c3-4397-94de-328f6e9e2f3f", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "true", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-SkipMixedValidations", + "Guid": "b4467109-23fe-4b53-a872-10571d81a35a", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "DateTime.Now", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-StockReceptionDate", + "Guid": "70b3d47b-6b05-48cf-a7ca-653f6a0de271", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "null", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-SupplierCode", + "Guid": "165e56ce-b2f9-4ac7-b5c5-9873ab40d603", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).UoMCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UnitOfMeasureCode", + "Guid": "e3920da5-f2bd-452e-b754-b5edaefe601a", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Status?.StaUsrCode ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UserDefinedStatusCode", + "Guid": "b9fe93a5-fd2b-485e-87cb-9ec440616edb", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Status?.StaUsrComment ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UserDefinedStatusComment", + "Guid": "b9ec6522-7a21-4e79-bcd5-ee20ceab6e69", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Status?.StaUsrEnd", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UserDefinedStatusEnd", + "Guid": "87a1af20-7639-453e-a4a1-17fb095bb15b", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-WarehouseCode", + "Guid": "1e6fa890-9d42-4cbe-88ac-003d422c5cb0", + "Name": "NoName", + "UseType": "Attribute" + } + ] + }, + "Guid": "f215ef2f-520e-4587-8f83-b31e05ac0782", + "Height": 24, + "ImplementationInternal": "Command-StockCreateOnHolderCommand-{4e53c983-9573-4853-8a47-a3d3b71738a9}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Create Stock", + "OperationName": "", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create_Stock-i++-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i++", + "ExceptionRollback": false, + "Guid": "457247e6-be82-4741-8377-3554c4ef3010", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create_Stock-Err._Cant_Create_Stock-Error-Exception", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Exception", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 138.000015, + "Y": 258.000031 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 290, + "Y": 258 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 290, + "Y": 122 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "ExceptionRollback": true, + "Guid": "39b38c44-0610-4cc1-afd7-87ea5e3891d3", + "Name": "Error", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 246 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does it need an MLD check", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowDecisionActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "ffeaa8a1-791a-4971-8605-4c78a3093a94", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Does it need an MLD check", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does_it_need_an_MLD_check-Container_Exists_?-Not MLD-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container Exists ?", + "ExceptionRollback": false, + "Guid": "adcf0deb-4716-4929-aebc-063b98123b1a", + "Name": "Not MLD", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does_it_need_an_MLD_check-Get_Division_Type-Is MLD-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "wscList[(int)i].ContainerTypeCode == \"MLD180\" || wscList[(int)i].ContainerTypeCode == \"MLD320\"", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Division Type", + "ExceptionRollback": false, + "Guid": "c1fbfd1f-b12a-46b1-85dd-62f24779d70f", + "Name": "Is MLD", + "Sequence": 1 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 98 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container Exists ?", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-container" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerCode", + "FormalParameterInternal": "FOPA-Query-{9124c19f-f770-47af-9e8f-1876b47b1993}-containerCode", + "Guid": "609a5f2c-eef3-44b0-b215-c0e992843972", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "7f5971c6-4a92-4562-b0fc-4bdca01f09d4", + "Height": 24, + "ImplementationInternal": "Query-Container_GetByUniqueCode-{9124c19f-f770-47af-9e8f-1876b47b1993}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Container Exists ?", + "OrderBy": "", + "Priority": 0, + "Select": "x => new ContainerWF() { #: ContainerId = x.Id, #: Code = x.Code, #: LocationCode = x.Location.Code #:}", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container_Exists_?-Create_Container-No-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Container", + "ExceptionRollback": false, + "Guid": "255bfc1b-de8e-4648-873e-5f6a1b2f26f2", + "Name": "No", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container_Exists_?-Create_Stock-Yes-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "container != null", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Stock", + "ExceptionRollback": false, + "Guid": "87b66540-6012-435d-85c6-4e9493b0dd4c", + "Name": "Yes", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 146 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Division Type", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerDivisionCode", + "FormalParameterInternal": "FOPA-Query-{f0e83c6e-9fc7-4613-a942-bbcc40af15ac}-DivisionSection", + "Guid": "0bcb19c4-d844-4345-bf15-966bc010619e", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "1c2cb5ff-14a6-4e42-a528-2fc0e17d6c38", + "Height": 24, + "ImplementationInternal": "Query-CST_GetDivisionTypeCode_by_DivisionSection-{f0e83c6e-9fc7-4613-a942-bbcc40af15ac}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get Division Type", + "OrderBy": "", + "Priority": 0, + "Select": "x => x.Code", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Division_Type-Container_Exists_?-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container Exists ?", + "ExceptionRollback": false, + "Guid": "f5a99938-cf7f-43f7-b347-029bcdecbeaa", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Division_Type-Err._Cant_Create_Stock-No Division Type-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "String.IsNullOrWhiteSpace(ContainerDivisionType);", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 218, + "Y": 108.414993 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 265.999969, + "Y": 110 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "ExceptionRollback": false, + "Guid": "9a45508b-a9cd-422e-ab2e-194f809c5edc", + "Name": "No Division Type", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 170, + "Y": 98 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Warehouse Code", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "\"DOMBASLE\"", + "FormalParameterInternal": "FOPA-Query-{07aa6b0e-2d24-4eec-9cb2-921ba4dc492a}-parameterCode", + "Guid": "6568f0f1-178c-4bf0-bfdf-5046e636f093", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "5ef49251-cdec-41db-9e9f-237154481634", + "Height": 24, + "ImplementationInternal": "Query-ParameterByCode-{07aa6b0e-2d24-4eec-9cb2-921ba4dc492a}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get Warehouse Code", + "OrderBy": "", + "Priority": 0, + "Select": "x=> x.HasCustomValue ? x.ParamValues.First().Value : x.DefaultValue", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Warehouse_Code-Does_it_need_an_MLD_check-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 75.625 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 98 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does it need an MLD check", + "ExceptionRollback": false, + "Guid": "abebd803-2b3c-4fc2-a50c-c1b557fa8861", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Warehouse_Code-Err._Cant_Create_Stock-Fail query-Exception", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Exception", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 138, + "Y": 66 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 288.773315, + "Y": 67.909996 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 290, + "Y": 98 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "ExceptionRollback": true, + "Guid": "355def36-ca93-4066-862d-347f299a9f09", + "Name": "Fail query", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 54 + } + ] + }, + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "FOPA-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "ContainerDivisionType", + "Stereotype": "String", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "Description": "Code entrepot", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "WarehouseCode", + "Stereotype": "String", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC" + }, + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "WSC", + "Stereotype": "String", + "WorkflowFormalParameterType": "UserCreated" + } + ] + }, + "Description": "Description", + "DurationUnit": "Second", + "Limit": 0, + "Module": "", + "Name": "CST_UDM_AddProductStock", + "ValidFrom": "2024-11-07", + "VersionId": "967ebcf1-d6b1-4aa5-9df5-963a152804aa" +} \ No newline at end of file diff --git a/temp/workflow_CST_UDM_AddProductStock_v10_1770647938609.json b/temp/workflow_CST_UDM_AddProductStock_v10_1770647938609.json new file mode 100644 index 0000000..5e7319c --- /dev/null +++ b/temp/workflow_CST_UDM_AddProductStock_v10_1770647938609.json @@ -0,0 +1,1409 @@ +{ + "$id": "Workflow-CST_UDM_AddProductStock-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}.EasyBpart", + "$type": "Mecalux.ITSW.EasyBuilder.Workflow, Mecalux.ITSW.EasyBuilder.Model", + "AttributesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-container", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "9b228d3d-1d2a-4457-9754-7b2018dd57cc", + "EntityStereotypeName": "ContainerWF", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "9c023783-2508-4b12-bd98-82bd3913c83c", + "InitialValue": "", + "Length": 100, + "Name": "container", + "Persist": true, + "Stereotype": "Record" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "cc10a82e-49db-4d28-af1c-4e2d8d77b37f", + "InitialValue": "", + "Length": 100, + "Name": "ContainerDivisionType", + "Persist": true, + "Stereotype": "String" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "68210308-df67-4f24-849b-8ff83fafb5e7", + "InitialValue": "0", + "Length": 100, + "Name": "i", + "Persist": true, + "Stereotype": "Integer" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Code entrepot", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "95a9b5ed-8968-4c78-862e-8c8ba394f5b2", + "InitialValue": "", + "Length": 100, + "Name": "WarehouseCode", + "Persist": true, + "Stereotype": "String" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "16d9c67a-1927-4358-9a2e-6561dd00325c", + "InitialValue": "", + "Length": 100, + "Name": "WSC", + "Persist": true, + "Stereotype": "String" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-wscList", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "00f6f18a-1cc5-44b4-9352-bd9fbdf227ad", + "Guid": "2241e9ab-7b85-4c52-8be0-0345bab52105", + "InitialValue": "", + "Length": 100, + "Name": "wscList", + "Persist": true, + "Stereotype": "List" + } + ] + }, + "ActivitiesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivity, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err Cant Read WSC", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "throw new InvalidOperationException(ProcessContext.Resources.GetString(\"CST_Json_reading_error\"));", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "b7390b1f-25f9-4725-a9d8-d19506f86bc4", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Err Cant Read WSC", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Width": 48, + "X": 26, + "Y": 2 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "throw new InvalidOperationException(ProcessContext.ProcessInfo.LastExceptionMessage);", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "c68f831c-553f-4f43-a4ca-c1dd4b840f03", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Err. Cant Create Stock", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Width": 48, + "X": 266, + "Y": 98 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i++", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "i++; #:ContainerDivisionType = string.Empty;", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "4d7b9c0e-a6ae-4783-978a-05f8ed2144c4", + "Name": "ContainerDivisionType", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "e6f2a17b-7192-44f4-8d84-c52496356506", + "Name": "i", + "UseType": "Attribute" + } + ] + }, + "Guid": "01a1cd18-3faf-4c00-91a0-0d311f49a08d", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "i++", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i++-Does_it_need_an_MLD_check-Again-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "i < wscList.Count()", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 90, + "Y": 314 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 31.66, + "Y": 313.18 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 36.14, + "Y": 110.63 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 92.86, + "Y": 111.43 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does it need an MLD check", + "ExceptionRollback": false, + "Guid": "8cd36194-b6fe-4024-abd5-d44b87c28b01", + "Name": "Again", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 302 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-JSON Decoder", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "// NewtonSoft #:Newtonsoft.Json.Linq.JArray jsonComplet = Newtonsoft.Json.Linq.JArray.Parse(WSC_string); #: #:var jetonStock = jsonComplet[0][\"Stocks\"]?[\"Stock\"]; #: #:if (jetonStock != null) #:{ #:wscList = jetonStock.ToObject(); #: #:}", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "56430350-f95d-4529-8834-57f5ad422d6b", + "Name": "WSC_string", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-wscList" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "89e14cc7-b31d-40d4-9e90-0862341e8e48", + "Name": "wscList", + "UseType": "Attribute" + } + ] + }, + "Guid": "1ee2a0c5-47f0-46da-86b7-fd37839ce743", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Initiator", + "Limit": 0, + "Name": "JSON Decoder", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-JSON_Decoder-Get_Warehouse_Code-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 26 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 54 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Warehouse Code", + "ExceptionRollback": false, + "Guid": "6a997af9-4e13-4835-b506-aa006dd27345", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-JSON_Decoder-Err_Cant_Read_WSC-WSC empty-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "String.IsNullOrWhiteSpace(WSC) && !wscList.Any()", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 90, + "Y": 14 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 73.9999161, + "Y": 13.9979248 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err Cant Read WSC", + "ExceptionRollback": false, + "Guid": "d3460178-7480-4a29-b2ac-44cda165e5ca", + "Name": "WSC empty", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 2 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Container", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCommandActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerCode", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-Code", + "Guid": "d5c229b8-ee82-456f-8d19-c670a4217f57", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "Guid.NewGuid()", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-ComponentId", + "Guid": "ba0aaafb-3b3a-4885-bcaa-3975578e4ba3", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerTypeCode", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-ContainerTypeCode", + "Guid": "48bbe3c5-e4df-40b0-bebe-5487a639594b", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-DivisionTypeCode", + "Guid": "96b3c50a-e3e6-4378-831d-cebba0d3a043", + "Name": "NoName", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).LocationCode", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-LocationCode", + "Guid": "ccd6dfa9-37cf-4a0c-af2b-37fb58cb6e09", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-WarehouseCode", + "Guid": "6ddc9df8-7d5f-4615-bcb6-87c0f523b86d", + "Name": "NoName", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "1", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-X", + "Guid": "38ee46af-4808-4398-a6d9-7036dbdde5f3", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "1", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-Y", + "Guid": "6c319812-e7e9-484a-a5b0-b5e6ce180e60", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "b6d3b100-f762-48a3-bb27-06a706e64bbf", + "Height": 24, + "ImplementationInternal": "Command-ContainerCreateOnLocationCommand-{f719cc88-caeb-48c2-91d7-ba678811be67}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Create Container", + "OperationName": "", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create_Container-Create_Stock-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Stock", + "ExceptionRollback": false, + "Guid": "91e594cd-d414-4b26-8981-e6c4fecedc7f", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 130, + "Y": 190 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Stock", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCommandActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-ContainerCode", + "Guid": "359da701-056a-49bc-9489-8874d9e426c1", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt01 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute1", + "Guid": "dab2551f-12e8-4a46-b446-408993c5a693", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt10 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute10", + "Guid": "ef5f0be6-03f1-41ff-8c7f-42f6bbdc7b74", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt11 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute11", + "Guid": "25542587-2f7e-462b-b381-f5caec7a94fc", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt12 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute12", + "Guid": "b731f044-97f4-4bff-9ee9-34f84b77e9ca", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt13 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute13", + "Guid": "ea78d2da-c528-4f17-aaf1-5c8edc566e67", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt14 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute14", + "Guid": "0eabc9c6-d7df-4a52-9e61-7dd52764057f", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt15 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute15", + "Guid": "8b7710e3-6604-4293-85ca-dba82f14e853", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt16 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute16", + "Guid": "6a93506b-df6e-4363-a14e-e4c0b27ee5d8", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt17 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute17", + "Guid": "7b688db8-5161-44be-a91e-53c4371affa1", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt18 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute18", + "Guid": "b65bbe13-412d-4da0-b63b-b26a691d3440", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt19 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute19", + "Guid": "4ab9bf24-0aee-4508-ab73-56e11f380442", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt02 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute2", + "Guid": "7a942bc5-ffc2-40e1-96cf-efa943853385", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt20 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute20", + "Guid": "345ecf9a-d589-47de-977f-a2ddd89f90e1", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt03 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute3", + "Guid": "06409dd1-e76e-4758-a991-edeacef804b2", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt04 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute4", + "Guid": "2e30de1e-e21e-4ad7-8961-97699ed25f38", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt05 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute5", + "Guid": "6b8cbf1e-1192-41fd-a3b8-cb267eae3c08", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt06 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute6", + "Guid": "903f215b-1742-4bf1-a62d-4359cb1fadb5", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt07 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute7", + "Guid": "095ea9cb-cd2b-452a-b8db-a0a3c20e2f9d", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt08 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute8", + "Guid": "4ca27442-3f6d-4cc6-8cff-85b5c12bf9b2", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt09 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute9", + "Guid": "809bd4ea-582c-4326-b847-3e576a44291a", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerDivisionCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-DivisionCode", + "Guid": "b62bbd7d-147b-4dac-8463-496fc638cddc", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).LocationCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LocationCode", + "Guid": "bb2cd6ba-af3d-4f81-8920-cb03591f2e5b", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttBBDate", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.BestBeforeDate", + "Guid": "1e20a0ee-c2e1-469a-b346-3636a1407ede", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttColor ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Colour", + "Guid": "18584125-708c-47d9-b225-873345cf7fad", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttDaysLife", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.DaysOfLife", + "Guid": "252eff93-22bb-45f7-9fcf-88c936e08e66", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttExpDate", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.ExpirationDate", + "Guid": "6a5e318d-29ee-4968-9fba-4bc1a9302245", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttLot ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.LotCode", + "Guid": "acfab2b4-8947-45cc-989e-c795aa7f937e", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttPostTreat ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.PostProductionTreatment", + "Guid": "968ddd97-8959-45a1-9f99-393ed9dcbd89", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttProdDate", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.ProductionDate", + "Guid": "2cb71aad-fa2e-458e-8c87-069729c3fc59", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttProdMethod ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.ProductionMethod", + "Guid": "e7cffcc1-2b2b-4e3a-a144-e81d7eab03fc", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttQuality ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Quality", + "Guid": "1ef5d3ff-c5c8-48a3-ad61-cad72656ede2", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttSN ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.SerialNumber", + "Guid": "0ac1c3a7-9fee-445d-9302-f4685b6e1aeb", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttSize ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Size", + "Guid": "06fc60a3-b98b-480c-8a8d-2902e48a05e3", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttSize ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Source", + "Guid": "d9b78ca7-3913-417f-96b0-457e9d03b16d", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttVersion ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Version", + "Guid": "38afa668-76ca-489c-a23d-e6f194225923", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).OwnerCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-OwnerCode", + "Guid": "1852e951-0398-4fae-b94d-83b6576f6c30", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ItemCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-ProductCode", + "Guid": "fc7b15c7-2459-4e87-a631-0aa7f2355fdf", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Quantity", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-Quantity", + "Guid": "93056d3d-61c3-4397-94de-328f6e9e2f3f", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "true", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-SkipMixedValidations", + "Guid": "b4467109-23fe-4b53-a872-10571d81a35a", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "DateTime.Now", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-StockReceptionDate", + "Guid": "70b3d47b-6b05-48cf-a7ca-653f6a0de271", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "null", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-SupplierCode", + "Guid": "165e56ce-b2f9-4ac7-b5c5-9873ab40d603", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).UoMCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UnitOfMeasureCode", + "Guid": "e3920da5-f2bd-452e-b754-b5edaefe601a", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Status?.StaUsrCode ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UserDefinedStatusCode", + "Guid": "b9fe93a5-fd2b-485e-87cb-9ec440616edb", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Status?.StaUsrComment ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UserDefinedStatusComment", + "Guid": "b9ec6522-7a21-4e79-bcd5-ee20ceab6e69", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Status?.StaUsrEnd", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UserDefinedStatusEnd", + "Guid": "87a1af20-7639-453e-a4a1-17fb095bb15b", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-WarehouseCode", + "Guid": "1e6fa890-9d42-4cbe-88ac-003d422c5cb0", + "Name": "NoName", + "UseType": "Attribute" + } + ] + }, + "Guid": "f215ef2f-520e-4587-8f83-b31e05ac0782", + "Height": 24, + "ImplementationInternal": "Command-StockCreateOnHolderCommand-{4e53c983-9573-4853-8a47-a3d3b71738a9}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Create Stock", + "OperationName": "", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create_Stock-i++-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i++", + "ExceptionRollback": false, + "Guid": "457247e6-be82-4741-8377-3554c4ef3010", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create_Stock-Err._Cant_Create_Stock-Error-Exception", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Exception", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 138.000015, + "Y": 258.000031 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 290, + "Y": 258 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 290, + "Y": 122 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "ExceptionRollback": true, + "Guid": "39b38c44-0610-4cc1-afd7-87ea5e3891d3", + "Name": "Error", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 246 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does it need an MLD check", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowDecisionActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "ffeaa8a1-791a-4971-8605-4c78a3093a94", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Does it need an MLD check", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does_it_need_an_MLD_check-Container_Exists_?-Not MLD-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container Exists ?", + "ExceptionRollback": false, + "Guid": "adcf0deb-4716-4929-aebc-063b98123b1a", + "Name": "Not MLD", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does_it_need_an_MLD_check-Get_Division_Type-Is MLD-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "wscList[(int)i].ContainerTypeCode == \"MLD180\" || wscList[(int)i].ContainerTypeCode == \"MLD320\"", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Division Type", + "ExceptionRollback": false, + "Guid": "c1fbfd1f-b12a-46b1-85dd-62f24779d70f", + "Name": "Is MLD", + "Sequence": 1 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 98 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container Exists ?", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-container" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerCode", + "FormalParameterInternal": "FOPA-Query-{9124c19f-f770-47af-9e8f-1876b47b1993}-containerCode", + "Guid": "609a5f2c-eef3-44b0-b215-c0e992843972", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "7f5971c6-4a92-4562-b0fc-4bdca01f09d4", + "Height": 24, + "ImplementationInternal": "Query-Container_GetByUniqueCode-{9124c19f-f770-47af-9e8f-1876b47b1993}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Container Exists ?", + "OrderBy": "", + "Priority": 0, + "Select": "x => new ContainerWF() { #: ContainerId = x.Id, #: Code = x.Code, #: LocationCode = x.Location.Code #:}", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container_Exists_?-Create_Container-No-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Container", + "ExceptionRollback": false, + "Guid": "255bfc1b-de8e-4648-873e-5f6a1b2f26f2", + "Name": "No", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container_Exists_?-Create_Stock-Yes-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "container != null", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Stock", + "ExceptionRollback": false, + "Guid": "87b66540-6012-435d-85c6-4e9493b0dd4c", + "Name": "Yes", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 146 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Division Type", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerDivisionCode", + "FormalParameterInternal": "FOPA-Query-{f0e83c6e-9fc7-4613-a942-bbcc40af15ac}-DivisionSection", + "Guid": "0bcb19c4-d844-4345-bf15-966bc010619e", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "1c2cb5ff-14a6-4e42-a528-2fc0e17d6c38", + "Height": 24, + "ImplementationInternal": "Query-CST_GetDivisionTypeCode_by_DivisionSection-{f0e83c6e-9fc7-4613-a942-bbcc40af15ac}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get Division Type", + "OrderBy": "", + "Priority": 0, + "Select": "x => x.Code", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Division_Type-Container_Exists_?-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container Exists ?", + "ExceptionRollback": false, + "Guid": "f5a99938-cf7f-43f7-b347-029bcdecbeaa", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Division_Type-Err._Cant_Create_Stock-No Division Type-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "String.IsNullOrWhiteSpace(ContainerDivisionType);", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 218, + "Y": 108.414993 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 265.999969, + "Y": 110 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "ExceptionRollback": false, + "Guid": "9a45508b-a9cd-422e-ab2e-194f809c5edc", + "Name": "No Division Type", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 170, + "Y": 98 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Warehouse Code", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "\"DOMBASLE\"", + "FormalParameterInternal": "FOPA-Query-{07aa6b0e-2d24-4eec-9cb2-921ba4dc492a}-parameterCode", + "Guid": "6568f0f1-178c-4bf0-bfdf-5046e636f093", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "5ef49251-cdec-41db-9e9f-237154481634", + "Height": 24, + "ImplementationInternal": "Query-ParameterByCode-{07aa6b0e-2d24-4eec-9cb2-921ba4dc492a}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get Warehouse Code", + "OrderBy": "", + "Priority": 0, + "Select": "x=> x.HasCustomValue ? x.ParamValues.First().Value : x.DefaultValue", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Warehouse_Code-Does_it_need_an_MLD_check-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 75.625 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 98 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does it need an MLD check", + "ExceptionRollback": false, + "Guid": "abebd803-2b3c-4fc2-a50c-c1b557fa8861", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Warehouse_Code-Err._Cant_Create_Stock-Fail query-Exception", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Exception", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 138, + "Y": 66 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 288.773315, + "Y": 67.909996 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 290, + "Y": 98 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "ExceptionRollback": true, + "Guid": "355def36-ca93-4066-862d-347f299a9f09", + "Name": "Fail query", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 54 + } + ] + }, + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "FOPA-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "ContainerDivisionType", + "Stereotype": "String", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "Description": "Code entrepot", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "WarehouseCode", + "Stereotype": "String", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC" + }, + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "WSC", + "Stereotype": "String", + "WorkflowFormalParameterType": "UserCreated" + } + ] + }, + "Description": "Description", + "DurationUnit": "Second", + "Limit": 0, + "Module": "", + "Name": "CST_UDM_AddProductStock", + "ValidFrom": "2024-11-07", + "VersionId": "967ebcf1-d6b1-4aa5-9df5-963a152804aa" +} \ No newline at end of file diff --git a/temp/workflow_CST_UDM_AddProductStock_v10_1770647943667.json b/temp/workflow_CST_UDM_AddProductStock_v10_1770647943667.json new file mode 100644 index 0000000..5e7319c --- /dev/null +++ b/temp/workflow_CST_UDM_AddProductStock_v10_1770647943667.json @@ -0,0 +1,1409 @@ +{ + "$id": "Workflow-CST_UDM_AddProductStock-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}.EasyBpart", + "$type": "Mecalux.ITSW.EasyBuilder.Workflow, Mecalux.ITSW.EasyBuilder.Model", + "AttributesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-container", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "9b228d3d-1d2a-4457-9754-7b2018dd57cc", + "EntityStereotypeName": "ContainerWF", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "9c023783-2508-4b12-bd98-82bd3913c83c", + "InitialValue": "", + "Length": 100, + "Name": "container", + "Persist": true, + "Stereotype": "Record" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "cc10a82e-49db-4d28-af1c-4e2d8d77b37f", + "InitialValue": "", + "Length": 100, + "Name": "ContainerDivisionType", + "Persist": true, + "Stereotype": "String" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "68210308-df67-4f24-849b-8ff83fafb5e7", + "InitialValue": "0", + "Length": 100, + "Name": "i", + "Persist": true, + "Stereotype": "Integer" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Code entrepot", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "95a9b5ed-8968-4c78-862e-8c8ba394f5b2", + "InitialValue": "", + "Length": 100, + "Name": "WarehouseCode", + "Persist": true, + "Stereotype": "String" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "16d9c67a-1927-4358-9a2e-6561dd00325c", + "InitialValue": "", + "Length": 100, + "Name": "WSC", + "Persist": true, + "Stereotype": "String" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-wscList", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "00f6f18a-1cc5-44b4-9352-bd9fbdf227ad", + "Guid": "2241e9ab-7b85-4c52-8be0-0345bab52105", + "InitialValue": "", + "Length": 100, + "Name": "wscList", + "Persist": true, + "Stereotype": "List" + } + ] + }, + "ActivitiesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivity, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err Cant Read WSC", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "throw new InvalidOperationException(ProcessContext.Resources.GetString(\"CST_Json_reading_error\"));", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "b7390b1f-25f9-4725-a9d8-d19506f86bc4", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Err Cant Read WSC", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Width": 48, + "X": 26, + "Y": 2 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "throw new InvalidOperationException(ProcessContext.ProcessInfo.LastExceptionMessage);", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "c68f831c-553f-4f43-a4ca-c1dd4b840f03", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Err. Cant Create Stock", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Width": 48, + "X": 266, + "Y": 98 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i++", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "i++; #:ContainerDivisionType = string.Empty;", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "4d7b9c0e-a6ae-4783-978a-05f8ed2144c4", + "Name": "ContainerDivisionType", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "e6f2a17b-7192-44f4-8d84-c52496356506", + "Name": "i", + "UseType": "Attribute" + } + ] + }, + "Guid": "01a1cd18-3faf-4c00-91a0-0d311f49a08d", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "i++", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i++-Does_it_need_an_MLD_check-Again-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "i < wscList.Count()", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 90, + "Y": 314 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 31.66, + "Y": 313.18 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 36.14, + "Y": 110.63 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 92.86, + "Y": 111.43 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does it need an MLD check", + "ExceptionRollback": false, + "Guid": "8cd36194-b6fe-4024-abd5-d44b87c28b01", + "Name": "Again", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 302 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-JSON Decoder", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "// NewtonSoft #:Newtonsoft.Json.Linq.JArray jsonComplet = Newtonsoft.Json.Linq.JArray.Parse(WSC_string); #: #:var jetonStock = jsonComplet[0][\"Stocks\"]?[\"Stock\"]; #: #:if (jetonStock != null) #:{ #:wscList = jetonStock.ToObject(); #: #:}", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "56430350-f95d-4529-8834-57f5ad422d6b", + "Name": "WSC_string", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-wscList" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "89e14cc7-b31d-40d4-9e90-0862341e8e48", + "Name": "wscList", + "UseType": "Attribute" + } + ] + }, + "Guid": "1ee2a0c5-47f0-46da-86b7-fd37839ce743", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Initiator", + "Limit": 0, + "Name": "JSON Decoder", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-JSON_Decoder-Get_Warehouse_Code-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 26 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 54 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Warehouse Code", + "ExceptionRollback": false, + "Guid": "6a997af9-4e13-4835-b506-aa006dd27345", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-JSON_Decoder-Err_Cant_Read_WSC-WSC empty-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "String.IsNullOrWhiteSpace(WSC) && !wscList.Any()", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 90, + "Y": 14 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 73.9999161, + "Y": 13.9979248 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err Cant Read WSC", + "ExceptionRollback": false, + "Guid": "d3460178-7480-4a29-b2ac-44cda165e5ca", + "Name": "WSC empty", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 2 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Container", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCommandActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerCode", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-Code", + "Guid": "d5c229b8-ee82-456f-8d19-c670a4217f57", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "Guid.NewGuid()", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-ComponentId", + "Guid": "ba0aaafb-3b3a-4885-bcaa-3975578e4ba3", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerTypeCode", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-ContainerTypeCode", + "Guid": "48bbe3c5-e4df-40b0-bebe-5487a639594b", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-DivisionTypeCode", + "Guid": "96b3c50a-e3e6-4378-831d-cebba0d3a043", + "Name": "NoName", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).LocationCode", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-LocationCode", + "Guid": "ccd6dfa9-37cf-4a0c-af2b-37fb58cb6e09", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-WarehouseCode", + "Guid": "6ddc9df8-7d5f-4615-bcb6-87c0f523b86d", + "Name": "NoName", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "1", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-X", + "Guid": "38ee46af-4808-4398-a6d9-7036dbdde5f3", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "1", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-Y", + "Guid": "6c319812-e7e9-484a-a5b0-b5e6ce180e60", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "b6d3b100-f762-48a3-bb27-06a706e64bbf", + "Height": 24, + "ImplementationInternal": "Command-ContainerCreateOnLocationCommand-{f719cc88-caeb-48c2-91d7-ba678811be67}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Create Container", + "OperationName": "", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create_Container-Create_Stock-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Stock", + "ExceptionRollback": false, + "Guid": "91e594cd-d414-4b26-8981-e6c4fecedc7f", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 130, + "Y": 190 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Stock", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCommandActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-ContainerCode", + "Guid": "359da701-056a-49bc-9489-8874d9e426c1", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt01 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute1", + "Guid": "dab2551f-12e8-4a46-b446-408993c5a693", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt10 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute10", + "Guid": "ef5f0be6-03f1-41ff-8c7f-42f6bbdc7b74", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt11 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute11", + "Guid": "25542587-2f7e-462b-b381-f5caec7a94fc", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt12 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute12", + "Guid": "b731f044-97f4-4bff-9ee9-34f84b77e9ca", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt13 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute13", + "Guid": "ea78d2da-c528-4f17-aaf1-5c8edc566e67", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt14 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute14", + "Guid": "0eabc9c6-d7df-4a52-9e61-7dd52764057f", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt15 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute15", + "Guid": "8b7710e3-6604-4293-85ca-dba82f14e853", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt16 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute16", + "Guid": "6a93506b-df6e-4363-a14e-e4c0b27ee5d8", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt17 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute17", + "Guid": "7b688db8-5161-44be-a91e-53c4371affa1", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt18 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute18", + "Guid": "b65bbe13-412d-4da0-b63b-b26a691d3440", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt19 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute19", + "Guid": "4ab9bf24-0aee-4508-ab73-56e11f380442", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt02 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute2", + "Guid": "7a942bc5-ffc2-40e1-96cf-efa943853385", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt20 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute20", + "Guid": "345ecf9a-d589-47de-977f-a2ddd89f90e1", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt03 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute3", + "Guid": "06409dd1-e76e-4758-a991-edeacef804b2", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt04 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute4", + "Guid": "2e30de1e-e21e-4ad7-8961-97699ed25f38", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt05 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute5", + "Guid": "6b8cbf1e-1192-41fd-a3b8-cb267eae3c08", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt06 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute6", + "Guid": "903f215b-1742-4bf1-a62d-4359cb1fadb5", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt07 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute7", + "Guid": "095ea9cb-cd2b-452a-b8db-a0a3c20e2f9d", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt08 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute8", + "Guid": "4ca27442-3f6d-4cc6-8cff-85b5c12bf9b2", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt09 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute9", + "Guid": "809bd4ea-582c-4326-b847-3e576a44291a", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerDivisionCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-DivisionCode", + "Guid": "b62bbd7d-147b-4dac-8463-496fc638cddc", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).LocationCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LocationCode", + "Guid": "bb2cd6ba-af3d-4f81-8920-cb03591f2e5b", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttBBDate", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.BestBeforeDate", + "Guid": "1e20a0ee-c2e1-469a-b346-3636a1407ede", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttColor ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Colour", + "Guid": "18584125-708c-47d9-b225-873345cf7fad", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttDaysLife", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.DaysOfLife", + "Guid": "252eff93-22bb-45f7-9fcf-88c936e08e66", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttExpDate", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.ExpirationDate", + "Guid": "6a5e318d-29ee-4968-9fba-4bc1a9302245", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttLot ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.LotCode", + "Guid": "acfab2b4-8947-45cc-989e-c795aa7f937e", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttPostTreat ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.PostProductionTreatment", + "Guid": "968ddd97-8959-45a1-9f99-393ed9dcbd89", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttProdDate", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.ProductionDate", + "Guid": "2cb71aad-fa2e-458e-8c87-069729c3fc59", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttProdMethod ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.ProductionMethod", + "Guid": "e7cffcc1-2b2b-4e3a-a144-e81d7eab03fc", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttQuality ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Quality", + "Guid": "1ef5d3ff-c5c8-48a3-ad61-cad72656ede2", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttSN ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.SerialNumber", + "Guid": "0ac1c3a7-9fee-445d-9302-f4685b6e1aeb", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttSize ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Size", + "Guid": "06fc60a3-b98b-480c-8a8d-2902e48a05e3", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttSize ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Source", + "Guid": "d9b78ca7-3913-417f-96b0-457e9d03b16d", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttVersion ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Version", + "Guid": "38afa668-76ca-489c-a23d-e6f194225923", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).OwnerCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-OwnerCode", + "Guid": "1852e951-0398-4fae-b94d-83b6576f6c30", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ItemCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-ProductCode", + "Guid": "fc7b15c7-2459-4e87-a631-0aa7f2355fdf", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Quantity", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-Quantity", + "Guid": "93056d3d-61c3-4397-94de-328f6e9e2f3f", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "true", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-SkipMixedValidations", + "Guid": "b4467109-23fe-4b53-a872-10571d81a35a", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "DateTime.Now", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-StockReceptionDate", + "Guid": "70b3d47b-6b05-48cf-a7ca-653f6a0de271", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "null", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-SupplierCode", + "Guid": "165e56ce-b2f9-4ac7-b5c5-9873ab40d603", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).UoMCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UnitOfMeasureCode", + "Guid": "e3920da5-f2bd-452e-b754-b5edaefe601a", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Status?.StaUsrCode ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UserDefinedStatusCode", + "Guid": "b9fe93a5-fd2b-485e-87cb-9ec440616edb", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Status?.StaUsrComment ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UserDefinedStatusComment", + "Guid": "b9ec6522-7a21-4e79-bcd5-ee20ceab6e69", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Status?.StaUsrEnd", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UserDefinedStatusEnd", + "Guid": "87a1af20-7639-453e-a4a1-17fb095bb15b", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-WarehouseCode", + "Guid": "1e6fa890-9d42-4cbe-88ac-003d422c5cb0", + "Name": "NoName", + "UseType": "Attribute" + } + ] + }, + "Guid": "f215ef2f-520e-4587-8f83-b31e05ac0782", + "Height": 24, + "ImplementationInternal": "Command-StockCreateOnHolderCommand-{4e53c983-9573-4853-8a47-a3d3b71738a9}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Create Stock", + "OperationName": "", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create_Stock-i++-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i++", + "ExceptionRollback": false, + "Guid": "457247e6-be82-4741-8377-3554c4ef3010", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create_Stock-Err._Cant_Create_Stock-Error-Exception", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Exception", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 138.000015, + "Y": 258.000031 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 290, + "Y": 258 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 290, + "Y": 122 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "ExceptionRollback": true, + "Guid": "39b38c44-0610-4cc1-afd7-87ea5e3891d3", + "Name": "Error", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 246 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does it need an MLD check", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowDecisionActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "ffeaa8a1-791a-4971-8605-4c78a3093a94", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Does it need an MLD check", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does_it_need_an_MLD_check-Container_Exists_?-Not MLD-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container Exists ?", + "ExceptionRollback": false, + "Guid": "adcf0deb-4716-4929-aebc-063b98123b1a", + "Name": "Not MLD", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does_it_need_an_MLD_check-Get_Division_Type-Is MLD-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "wscList[(int)i].ContainerTypeCode == \"MLD180\" || wscList[(int)i].ContainerTypeCode == \"MLD320\"", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Division Type", + "ExceptionRollback": false, + "Guid": "c1fbfd1f-b12a-46b1-85dd-62f24779d70f", + "Name": "Is MLD", + "Sequence": 1 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 98 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container Exists ?", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-container" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerCode", + "FormalParameterInternal": "FOPA-Query-{9124c19f-f770-47af-9e8f-1876b47b1993}-containerCode", + "Guid": "609a5f2c-eef3-44b0-b215-c0e992843972", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "7f5971c6-4a92-4562-b0fc-4bdca01f09d4", + "Height": 24, + "ImplementationInternal": "Query-Container_GetByUniqueCode-{9124c19f-f770-47af-9e8f-1876b47b1993}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Container Exists ?", + "OrderBy": "", + "Priority": 0, + "Select": "x => new ContainerWF() { #: ContainerId = x.Id, #: Code = x.Code, #: LocationCode = x.Location.Code #:}", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container_Exists_?-Create_Container-No-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Container", + "ExceptionRollback": false, + "Guid": "255bfc1b-de8e-4648-873e-5f6a1b2f26f2", + "Name": "No", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container_Exists_?-Create_Stock-Yes-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "container != null", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Stock", + "ExceptionRollback": false, + "Guid": "87b66540-6012-435d-85c6-4e9493b0dd4c", + "Name": "Yes", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 146 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Division Type", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerDivisionCode", + "FormalParameterInternal": "FOPA-Query-{f0e83c6e-9fc7-4613-a942-bbcc40af15ac}-DivisionSection", + "Guid": "0bcb19c4-d844-4345-bf15-966bc010619e", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "1c2cb5ff-14a6-4e42-a528-2fc0e17d6c38", + "Height": 24, + "ImplementationInternal": "Query-CST_GetDivisionTypeCode_by_DivisionSection-{f0e83c6e-9fc7-4613-a942-bbcc40af15ac}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get Division Type", + "OrderBy": "", + "Priority": 0, + "Select": "x => x.Code", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Division_Type-Container_Exists_?-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container Exists ?", + "ExceptionRollback": false, + "Guid": "f5a99938-cf7f-43f7-b347-029bcdecbeaa", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Division_Type-Err._Cant_Create_Stock-No Division Type-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "String.IsNullOrWhiteSpace(ContainerDivisionType);", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 218, + "Y": 108.414993 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 265.999969, + "Y": 110 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "ExceptionRollback": false, + "Guid": "9a45508b-a9cd-422e-ab2e-194f809c5edc", + "Name": "No Division Type", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 170, + "Y": 98 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Warehouse Code", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "\"DOMBASLE\"", + "FormalParameterInternal": "FOPA-Query-{07aa6b0e-2d24-4eec-9cb2-921ba4dc492a}-parameterCode", + "Guid": "6568f0f1-178c-4bf0-bfdf-5046e636f093", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "5ef49251-cdec-41db-9e9f-237154481634", + "Height": 24, + "ImplementationInternal": "Query-ParameterByCode-{07aa6b0e-2d24-4eec-9cb2-921ba4dc492a}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get Warehouse Code", + "OrderBy": "", + "Priority": 0, + "Select": "x=> x.HasCustomValue ? x.ParamValues.First().Value : x.DefaultValue", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Warehouse_Code-Does_it_need_an_MLD_check-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 75.625 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 98 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does it need an MLD check", + "ExceptionRollback": false, + "Guid": "abebd803-2b3c-4fc2-a50c-c1b557fa8861", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Warehouse_Code-Err._Cant_Create_Stock-Fail query-Exception", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Exception", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 138, + "Y": 66 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 288.773315, + "Y": 67.909996 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 290, + "Y": 98 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "ExceptionRollback": true, + "Guid": "355def36-ca93-4066-862d-347f299a9f09", + "Name": "Fail query", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 54 + } + ] + }, + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "FOPA-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "ContainerDivisionType", + "Stereotype": "String", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "Description": "Code entrepot", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "WarehouseCode", + "Stereotype": "String", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC" + }, + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "WSC", + "Stereotype": "String", + "WorkflowFormalParameterType": "UserCreated" + } + ] + }, + "Description": "Description", + "DurationUnit": "Second", + "Limit": 0, + "Module": "", + "Name": "CST_UDM_AddProductStock", + "ValidFrom": "2024-11-07", + "VersionId": "967ebcf1-d6b1-4aa5-9df5-963a152804aa" +} \ No newline at end of file diff --git a/temp/workflow_CST_UDM_AddProductStock_v10_1770648099956.json b/temp/workflow_CST_UDM_AddProductStock_v10_1770648099956.json new file mode 100644 index 0000000..5e7319c --- /dev/null +++ b/temp/workflow_CST_UDM_AddProductStock_v10_1770648099956.json @@ -0,0 +1,1409 @@ +{ + "$id": "Workflow-CST_UDM_AddProductStock-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}.EasyBpart", + "$type": "Mecalux.ITSW.EasyBuilder.Workflow, Mecalux.ITSW.EasyBuilder.Model", + "AttributesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-container", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "9b228d3d-1d2a-4457-9754-7b2018dd57cc", + "EntityStereotypeName": "ContainerWF", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "9c023783-2508-4b12-bd98-82bd3913c83c", + "InitialValue": "", + "Length": 100, + "Name": "container", + "Persist": true, + "Stereotype": "Record" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "cc10a82e-49db-4d28-af1c-4e2d8d77b37f", + "InitialValue": "", + "Length": 100, + "Name": "ContainerDivisionType", + "Persist": true, + "Stereotype": "String" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "68210308-df67-4f24-849b-8ff83fafb5e7", + "InitialValue": "0", + "Length": 100, + "Name": "i", + "Persist": true, + "Stereotype": "Integer" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Code entrepot", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "95a9b5ed-8968-4c78-862e-8c8ba394f5b2", + "InitialValue": "", + "Length": 100, + "Name": "WarehouseCode", + "Persist": true, + "Stereotype": "String" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "16d9c67a-1927-4358-9a2e-6561dd00325c", + "InitialValue": "", + "Length": 100, + "Name": "WSC", + "Persist": true, + "Stereotype": "String" + }, + { + "$id": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-wscList", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "00f6f18a-1cc5-44b4-9352-bd9fbdf227ad", + "Guid": "2241e9ab-7b85-4c52-8be0-0345bab52105", + "InitialValue": "", + "Length": 100, + "Name": "wscList", + "Persist": true, + "Stereotype": "List" + } + ] + }, + "ActivitiesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivity, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err Cant Read WSC", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "throw new InvalidOperationException(ProcessContext.Resources.GetString(\"CST_Json_reading_error\"));", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "b7390b1f-25f9-4725-a9d8-d19506f86bc4", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Err Cant Read WSC", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Width": 48, + "X": 26, + "Y": 2 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "throw new InvalidOperationException(ProcessContext.ProcessInfo.LastExceptionMessage);", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "c68f831c-553f-4f43-a4ca-c1dd4b840f03", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Err. Cant Create Stock", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Width": 48, + "X": 266, + "Y": 98 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i++", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "i++; #:ContainerDivisionType = string.Empty;", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "4d7b9c0e-a6ae-4783-978a-05f8ed2144c4", + "Name": "ContainerDivisionType", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "e6f2a17b-7192-44f4-8d84-c52496356506", + "Name": "i", + "UseType": "Attribute" + } + ] + }, + "Guid": "01a1cd18-3faf-4c00-91a0-0d311f49a08d", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "i++", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i++-Does_it_need_an_MLD_check-Again-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "i < wscList.Count()", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 90, + "Y": 314 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 31.66, + "Y": 313.18 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 36.14, + "Y": 110.63 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 92.86, + "Y": 111.43 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does it need an MLD check", + "ExceptionRollback": false, + "Guid": "8cd36194-b6fe-4024-abd5-d44b87c28b01", + "Name": "Again", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 302 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-JSON Decoder", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "// NewtonSoft #:Newtonsoft.Json.Linq.JArray jsonComplet = Newtonsoft.Json.Linq.JArray.Parse(WSC_string); #: #:var jetonStock = jsonComplet[0][\"Stocks\"]?[\"Stock\"]; #: #:if (jetonStock != null) #:{ #:wscList = jetonStock.ToObject(); #: #:}", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "56430350-f95d-4529-8834-57f5ad422d6b", + "Name": "WSC_string", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-wscList" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "89e14cc7-b31d-40d4-9e90-0862341e8e48", + "Name": "wscList", + "UseType": "Attribute" + } + ] + }, + "Guid": "1ee2a0c5-47f0-46da-86b7-fd37839ce743", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Initiator", + "Limit": 0, + "Name": "JSON Decoder", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-JSON_Decoder-Get_Warehouse_Code-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 26 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 54 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Warehouse Code", + "ExceptionRollback": false, + "Guid": "6a997af9-4e13-4835-b506-aa006dd27345", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-JSON_Decoder-Err_Cant_Read_WSC-WSC empty-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "String.IsNullOrWhiteSpace(WSC) && !wscList.Any()", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 90, + "Y": 14 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 73.9999161, + "Y": 13.9979248 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err Cant Read WSC", + "ExceptionRollback": false, + "Guid": "d3460178-7480-4a29-b2ac-44cda165e5ca", + "Name": "WSC empty", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 2 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Container", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCommandActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerCode", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-Code", + "Guid": "d5c229b8-ee82-456f-8d19-c670a4217f57", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "Guid.NewGuid()", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-ComponentId", + "Guid": "ba0aaafb-3b3a-4885-bcaa-3975578e4ba3", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerTypeCode", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-ContainerTypeCode", + "Guid": "48bbe3c5-e4df-40b0-bebe-5487a639594b", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-DivisionTypeCode", + "Guid": "96b3c50a-e3e6-4378-831d-cebba0d3a043", + "Name": "NoName", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).LocationCode", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-LocationCode", + "Guid": "ccd6dfa9-37cf-4a0c-af2b-37fb58cb6e09", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-WarehouseCode", + "Guid": "6ddc9df8-7d5f-4615-bcb6-87c0f523b86d", + "Name": "NoName", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "1", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-X", + "Guid": "38ee46af-4808-4398-a6d9-7036dbdde5f3", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "1", + "FormalParameterInternal": "FOPA-Command-{f719cc88-caeb-48c2-91d7-ba678811be67}-Y", + "Guid": "6c319812-e7e9-484a-a5b0-b5e6ce180e60", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "b6d3b100-f762-48a3-bb27-06a706e64bbf", + "Height": 24, + "ImplementationInternal": "Command-ContainerCreateOnLocationCommand-{f719cc88-caeb-48c2-91d7-ba678811be67}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Create Container", + "OperationName": "", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create_Container-Create_Stock-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Stock", + "ExceptionRollback": false, + "Guid": "91e594cd-d414-4b26-8981-e6c4fecedc7f", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 130, + "Y": 190 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Stock", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCommandActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-ContainerCode", + "Guid": "359da701-056a-49bc-9489-8874d9e426c1", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt01 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute1", + "Guid": "dab2551f-12e8-4a46-b446-408993c5a693", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt10 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute10", + "Guid": "ef5f0be6-03f1-41ff-8c7f-42f6bbdc7b74", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt11 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute11", + "Guid": "25542587-2f7e-462b-b381-f5caec7a94fc", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt12 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute12", + "Guid": "b731f044-97f4-4bff-9ee9-34f84b77e9ca", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt13 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute13", + "Guid": "ea78d2da-c528-4f17-aaf1-5c8edc566e67", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt14 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute14", + "Guid": "0eabc9c6-d7df-4a52-9e61-7dd52764057f", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt15 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute15", + "Guid": "8b7710e3-6604-4293-85ca-dba82f14e853", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt16 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute16", + "Guid": "6a93506b-df6e-4363-a14e-e4c0b27ee5d8", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt17 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute17", + "Guid": "7b688db8-5161-44be-a91e-53c4371affa1", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt18 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute18", + "Guid": "b65bbe13-412d-4da0-b63b-b26a691d3440", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt19 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute19", + "Guid": "4ab9bf24-0aee-4508-ab73-56e11f380442", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt02 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute2", + "Guid": "7a942bc5-ffc2-40e1-96cf-efa943853385", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt20 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute20", + "Guid": "345ecf9a-d589-47de-977f-a2ddd89f90e1", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt03 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute3", + "Guid": "06409dd1-e76e-4758-a991-edeacef804b2", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt04 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute4", + "Guid": "2e30de1e-e21e-4ad7-8961-97699ed25f38", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt05 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute5", + "Guid": "6b8cbf1e-1192-41fd-a3b8-cb267eae3c08", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt06 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute6", + "Guid": "903f215b-1742-4bf1-a62d-4359cb1fadb5", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt07 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute7", + "Guid": "095ea9cb-cd2b-452a-b8db-a0a3c20e2f9d", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt08 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute8", + "Guid": "4ca27442-3f6d-4cc6-8cff-85b5c12bf9b2", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).CustomAttributes?.CstAtt09 ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-CustomAttribute.Attribute9", + "Guid": "809bd4ea-582c-4326-b847-3e576a44291a", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerDivisionCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-DivisionCode", + "Guid": "b62bbd7d-147b-4dac-8463-496fc638cddc", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).LocationCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LocationCode", + "Guid": "bb2cd6ba-af3d-4f81-8920-cb03591f2e5b", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttBBDate", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.BestBeforeDate", + "Guid": "1e20a0ee-c2e1-469a-b346-3636a1407ede", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttColor ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Colour", + "Guid": "18584125-708c-47d9-b225-873345cf7fad", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttDaysLife", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.DaysOfLife", + "Guid": "252eff93-22bb-45f7-9fcf-88c936e08e66", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttExpDate", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.ExpirationDate", + "Guid": "6a5e318d-29ee-4968-9fba-4bc1a9302245", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttLot ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.LotCode", + "Guid": "acfab2b4-8947-45cc-989e-c795aa7f937e", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttPostTreat ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.PostProductionTreatment", + "Guid": "968ddd97-8959-45a1-9f99-393ed9dcbd89", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttProdDate", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.ProductionDate", + "Guid": "2cb71aad-fa2e-458e-8c87-069729c3fc59", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttProdMethod ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.ProductionMethod", + "Guid": "e7cffcc1-2b2b-4e3a-a144-e81d7eab03fc", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttQuality ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Quality", + "Guid": "1ef5d3ff-c5c8-48a3-ad61-cad72656ede2", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttSN ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.SerialNumber", + "Guid": "0ac1c3a7-9fee-445d-9302-f4685b6e1aeb", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttSize ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Size", + "Guid": "06fc60a3-b98b-480c-8a8d-2902e48a05e3", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttSize ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Source", + "Guid": "d9b78ca7-3913-417f-96b0-457e9d03b16d", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Attributes?.AttVersion ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-LogisticAttributes.Version", + "Guid": "38afa668-76ca-489c-a23d-e6f194225923", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).OwnerCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-OwnerCode", + "Guid": "1852e951-0398-4fae-b94d-83b6576f6c30", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ItemCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-ProductCode", + "Guid": "fc7b15c7-2459-4e87-a631-0aa7f2355fdf", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Quantity", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-Quantity", + "Guid": "93056d3d-61c3-4397-94de-328f6e9e2f3f", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "true", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-SkipMixedValidations", + "Guid": "b4467109-23fe-4b53-a872-10571d81a35a", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "DateTime.Now", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-StockReceptionDate", + "Guid": "70b3d47b-6b05-48cf-a7ca-653f6a0de271", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "null", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-SupplierCode", + "Guid": "165e56ce-b2f9-4ac7-b5c5-9873ab40d603", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).UoMCode", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UnitOfMeasureCode", + "Guid": "e3920da5-f2bd-452e-b754-b5edaefe601a", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Status?.StaUsrCode ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UserDefinedStatusCode", + "Guid": "b9fe93a5-fd2b-485e-87cb-9ec440616edb", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Status?.StaUsrComment ?? string.Empty", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UserDefinedStatusComment", + "Guid": "b9ec6522-7a21-4e79-bcd5-ee20ceab6e69", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).Status?.StaUsrEnd", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-UserDefinedStatusEnd", + "Guid": "87a1af20-7639-453e-a4a1-17fb095bb15b", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Command-{4e53c983-9573-4853-8a47-a3d3b71738a9}-WarehouseCode", + "Guid": "1e6fa890-9d42-4cbe-88ac-003d422c5cb0", + "Name": "NoName", + "UseType": "Attribute" + } + ] + }, + "Guid": "f215ef2f-520e-4587-8f83-b31e05ac0782", + "Height": 24, + "ImplementationInternal": "Command-StockCreateOnHolderCommand-{4e53c983-9573-4853-8a47-a3d3b71738a9}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Create Stock", + "OperationName": "", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create_Stock-i++-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-i++", + "ExceptionRollback": false, + "Guid": "457247e6-be82-4741-8377-3554c4ef3010", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create_Stock-Err._Cant_Create_Stock-Error-Exception", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Exception", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 138.000015, + "Y": 258.000031 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 290, + "Y": 258 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 290, + "Y": 122 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "ExceptionRollback": true, + "Guid": "39b38c44-0610-4cc1-afd7-87ea5e3891d3", + "Name": "Error", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 246 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does it need an MLD check", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowDecisionActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "ffeaa8a1-791a-4971-8605-4c78a3093a94", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Does it need an MLD check", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does_it_need_an_MLD_check-Container_Exists_?-Not MLD-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container Exists ?", + "ExceptionRollback": false, + "Guid": "adcf0deb-4716-4929-aebc-063b98123b1a", + "Name": "Not MLD", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does_it_need_an_MLD_check-Get_Division_Type-Is MLD-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "wscList[(int)i].ContainerTypeCode == \"MLD180\" || wscList[(int)i].ContainerTypeCode == \"MLD320\"", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Division Type", + "ExceptionRollback": false, + "Guid": "c1fbfd1f-b12a-46b1-85dd-62f24779d70f", + "Name": "Is MLD", + "Sequence": 1 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 98 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container Exists ?", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-container" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerCode", + "FormalParameterInternal": "FOPA-Query-{9124c19f-f770-47af-9e8f-1876b47b1993}-containerCode", + "Guid": "609a5f2c-eef3-44b0-b215-c0e992843972", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "7f5971c6-4a92-4562-b0fc-4bdca01f09d4", + "Height": 24, + "ImplementationInternal": "Query-Container_GetByUniqueCode-{9124c19f-f770-47af-9e8f-1876b47b1993}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Container Exists ?", + "OrderBy": "", + "Priority": 0, + "Select": "x => new ContainerWF() { #: ContainerId = x.Id, #: Code = x.Code, #: LocationCode = x.Location.Code #:}", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container_Exists_?-Create_Container-No-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Container", + "ExceptionRollback": false, + "Guid": "255bfc1b-de8e-4648-873e-5f6a1b2f26f2", + "Name": "No", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container_Exists_?-Create_Stock-Yes-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "container != null", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Create Stock", + "ExceptionRollback": false, + "Guid": "87b66540-6012-435d-85c6-4e9493b0dd4c", + "Name": "Yes", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 146 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Division Type", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "wscList.ElementAt((int)i).ContainerDivisionCode", + "FormalParameterInternal": "FOPA-Query-{f0e83c6e-9fc7-4613-a942-bbcc40af15ac}-DivisionSection", + "Guid": "0bcb19c4-d844-4345-bf15-966bc010619e", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "1c2cb5ff-14a6-4e42-a528-2fc0e17d6c38", + "Height": 24, + "ImplementationInternal": "Query-CST_GetDivisionTypeCode_by_DivisionSection-{f0e83c6e-9fc7-4613-a942-bbcc40af15ac}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get Division Type", + "OrderBy": "", + "Priority": 0, + "Select": "x => x.Code", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Division_Type-Container_Exists_?-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Container Exists ?", + "ExceptionRollback": false, + "Guid": "f5a99938-cf7f-43f7-b347-029bcdecbeaa", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Division_Type-Err._Cant_Create_Stock-No Division Type-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "String.IsNullOrWhiteSpace(ContainerDivisionType);", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 218, + "Y": 108.414993 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 265.999969, + "Y": 110 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "ExceptionRollback": false, + "Guid": "9a45508b-a9cd-422e-ab2e-194f809c5edc", + "Name": "No Division Type", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 170, + "Y": 98 + }, + { + "$id": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get Warehouse Code", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "\"DOMBASLE\"", + "FormalParameterInternal": "FOPA-Query-{07aa6b0e-2d24-4eec-9cb2-921ba4dc492a}-parameterCode", + "Guid": "6568f0f1-178c-4bf0-bfdf-5046e636f093", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "5ef49251-cdec-41db-9e9f-237154481634", + "Height": 24, + "ImplementationInternal": "Query-ParameterByCode-{07aa6b0e-2d24-4eec-9cb2-921ba4dc492a}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get Warehouse Code", + "OrderBy": "", + "Priority": 0, + "Select": "x=> x.HasCustomValue ? x.ParamValues.First().Value : x.DefaultValue", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Warehouse_Code-Does_it_need_an_MLD_check-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 75.625 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 114, + "Y": 98 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Does it need an MLD check", + "ExceptionRollback": false, + "Guid": "abebd803-2b3c-4fc2-a50c-c1b557fa8861", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Get_Warehouse_Code-Err._Cant_Create_Stock-Fail query-Exception", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Exception", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 138, + "Y": 66 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 288.773315, + "Y": 67.909996 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 290, + "Y": 98 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-Err. Cant Create Stock", + "ExceptionRollback": true, + "Guid": "355def36-ca93-4066-862d-347f299a9f09", + "Name": "Fail query", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 90, + "Y": 54 + } + ] + }, + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "FOPA-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-ContainerDivisionType" + }, + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "ContainerDivisionType", + "Stereotype": "String", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WarehouseCode" + }, + "Description": "Code entrepot", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "WarehouseCode", + "Stereotype": "String", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{967ebcf1-d6b1-4aa5-9df5-963a152804aa}-WSC" + }, + "Description": "Description", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "WSC", + "Stereotype": "String", + "WorkflowFormalParameterType": "UserCreated" + } + ] + }, + "Description": "Description", + "DurationUnit": "Second", + "Limit": 0, + "Module": "", + "Name": "CST_UDM_AddProductStock", + "ValidFrom": "2024-11-07", + "VersionId": "967ebcf1-d6b1-4aa5-9df5-963a152804aa" +} \ No newline at end of file diff --git a/temp/workflow_CountOrder_CalculateLineDestinationStations_PR_v1_1770650109137.json b/temp/workflow_CountOrder_CalculateLineDestinationStations_PR_v1_1770650109137.json new file mode 100644 index 0000000..0e06fc0 --- /dev/null +++ b/temp/workflow_CountOrder_CalculateLineDestinationStations_PR_v1_1770650109137.json @@ -0,0 +1,1367 @@ +{ + "$id": "Workflow-CountOrder_CalculateLineDestinationStations_PR-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}.EasyBpart", + "$type": "Mecalux.ITSW.EasyBuilder.Workflow, Mecalux.ITSW.EasyBuilder.Model", + "AttributesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticHolderTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Automatic holder tasks", + "EntityStereotypeInternal": "c254d428-6f03-4376-a356-375fcb5349cb", + "EntityStereotypeName": "HolderCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "8f7a9cdf-1478-4355-933c-5821a79457fe", + "InitialValue": "new HolderCountTaskDataList()", + "Length": 0, + "Name": "automaticHolderTasks", + "Persist": true, + "Stereotype": "List" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticProductTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Automatic product tasks", + "EntityStereotypeInternal": "a8639390-98de-4824-a6df-473f281cd3e9", + "EntityStereotypeName": "ProductCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "d8adb5a0-42b3-496f-a514-d9b02cd45c1a", + "InitialValue": "new ProductCountTaskDataList()", + "Length": 0, + "Name": "automaticProductTasks", + "Persist": true, + "Stereotype": "List" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countLineId", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "(Required) Id of the count line", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "476f8a71-c783-46a6-9442-0e45e4afc4e4", + "InitialValue": "", + "Length": 100, + "Name": "countLineId", + "Persist": true, + "Stereotype": "Guid" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countLocationIndex", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Index to iterate line count locations.", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "51b27bb4-3895-4bc6-8b46-a545ecbd7d1c", + "InitialValue": "0", + "Length": 0, + "Name": "countLocationIndex", + "Persist": true, + "Stereotype": "Integer" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countOrderLine", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Line for which destination stations will be calculated.", + "EntityStereotypeInternal": "bf66289f-cfdf-4eca-a8ab-bf1c3d586936", + "EntityStereotypeName": "CountOrderLineWF", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "88e18d3e-f71d-4367-b4f4-81069f5a1f4c", + "InitialValue": null, + "Length": 0, + "Name": "countOrderLine", + "Persist": true, + "Stereotype": "Record" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-currentCountLocation", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "80ef96ec-0a15-482f-8c65-f81b48079c14", + "EntityStereotypeName": "CountLocationWF", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "f2570897-fa76-4e97-a811-0c8eaad51c13", + "InitialValue": null, + "Length": 0, + "Name": "currentCountLocation", + "Persist": true, + "Stereotype": "Record" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualHolderTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Manual holder tasks", + "EntityStereotypeInternal": "c254d428-6f03-4376-a356-375fcb5349cb", + "EntityStereotypeName": "HolderCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "3c7523ab-cf06-4208-b63f-ef0657683c22", + "InitialValue": "new HolderCountTaskDataList()", + "Length": 0, + "Name": "manualHolderTasks", + "Persist": true, + "Stereotype": "List" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualProductTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Manual product tasks", + "EntityStereotypeInternal": "a8639390-98de-4824-a6df-473f281cd3e9", + "EntityStereotypeName": "ProductCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "aa2c2ff8-3287-4d7c-be54-a4a9b913a687", + "InitialValue": "new ProductCountTaskDataList()", + "Length": 0, + "Name": "manualProductTasks", + "Persist": true, + "Stereotype": "List" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-station", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Station to use in the query", + "EntityStereotypeInternal": "21bb1311-4dc6-4e8d-82da-6e486c337cac", + "EntityStereotypeName": "StationWF", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "602e9a76-2c5e-4129-a7eb-b379f80d5b1b", + "InitialValue": "null", + "Length": 0, + "Name": "station", + "Persist": true, + "Stereotype": "Record" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-stocksInLocation", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "List of stock in the location", + "EntityStereotypeInternal": "0a25785b-a966-45d0-81ed-2e79d21c486b", + "EntityStereotypeName": "StockList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "9301c4dd-0c70-46be-801e-1ad38b4d5de4", + "InitialValue": "", + "Length": 100, + "Name": "stocksInLocation", + "Persist": true, + "Stereotype": "List" + } + ] + }, + "ActivitiesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivity, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Set task for container", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "//START CST #:if(currentCountLocation.Location.Containers.Any(x => x.ContainerId == countOrderLine.ContainerId.Value) && #: !currentCountLocation.CountedStockHolderIds.Any(x => x.Value == countOrderLine.ContainerId.Value) && #: !currentCountLocation.Tasks.Any() && #: currentCountLocation.LocationAllowCount) #:// END CST #:{ #: #: HolderCountTaskDataWF task= new HolderCountTaskDataWF() #: { #: TaskId=Guid.NewGuid(), #: StationId=station?.Id, #: HolderId=countOrderLine.ContainerId.Value #: }; #: #: if(station == null && !currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: manualHolderTasks.Add(task); #: } else if (station != null && currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: automaticHolderTasks.Add(task); #: } #:}", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticHolderTasks" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "e0d0e8d5-1a2a-47f5-a07f-157ffadf77a4", + "Name": "automaticHolderTasks", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countOrderLine" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "2eb8cc42-d49c-406e-bd20-95c5644ce864", + "Name": "countOrderLine", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-currentCountLocation" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "e9b17fe5-8fed-440a-a74a-12a88a5f2de5", + "Name": "currentCountLocation", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualHolderTasks" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "38d2ab46-b855-4635-8d33-0ed48854189e", + "Name": "manualHolderTasks", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-station" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "0b13acb3-c55c-465c-a0af-283865d7946d", + "Name": "station", + "UseType": "Attribute" + } + ] + }, + "Guid": "f588db93-7e05-4120-adf8-f48e51367dcf", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "CST Set task for container", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST_Set_task_for_container-Next_location-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next location", + "ExceptionRollback": false, + "Guid": "7d88f028-d851-4d14-bc2f-ed22f5ec064a", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 374 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Set tasks for location", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "if (station == null && !currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: if(!currentCountLocation.CountedStockHolderIds.Any(x => x.Value == currentCountLocation.LocationId) && !currentCountLocation.Tasks.Any() && currentCountLocation.LocationAllowCount) #: { #: HolderCountTaskDataWF task= new HolderCountTaskDataWF() #: { #: TaskId=Guid.NewGuid(), #: StationId=null, #: HolderId=currentCountLocation.LocationId #: }; #: #: manualHolderTasks.Add(task); #: } #:} else if (station != null && currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: if(currentCountLocation.LocationAllowCount) #: { #: foreach (Guid containerId in currentCountLocation.Location.Containers.Select(x => x.ContainerId).Distinct()) #: { #: //START CST #: if(!countOrderLine.CountLocations #: .SelectMany(x => x.CountedStockHolderIds) #: .Any(x => x.Value == containerId) && #: !currentCountLocation.Tasks.Any(x => x.ContainerId == containerId)) #: //END CST #: { #: HolderCountTaskDataWF task= new HolderCountTaskDataWF() #: { #: TaskId = Guid.NewGuid(), #: StationId = station.Id, #: HolderId = containerId #: }; #: #: automaticHolderTasks.Add(task); #: } #: } #: } #:}", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticHolderTasks" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "b578a5f4-64a7-46f5-b917-2347ba8d6462", + "Name": "automaticHolderTasks", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countOrderLine" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "1b98d93d-1d73-470b-9b58-754d8043f1f2", + "Name": "countOrderLine", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-currentCountLocation" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "34e0b029-4755-479d-a00c-c84175198780", + "Name": "currentCountLocation", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualHolderTasks" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "42fb9a4a-73f5-4fe6-8d1c-f266af2f5f30", + "Name": "manualHolderTasks", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-station" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "b5a042ec-0cb1-4585-8650-fda4ab34c93f", + "Name": "station", + "UseType": "Attribute" + } + ] + }, + "Guid": "817a7cca-d952-4772-a61b-c5399b2bdde3", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "CST Set tasks for location", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST_Set_tasks_for_location-Next_location-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next location", + "ExceptionRollback": false, + "Guid": "fd3fa2f5-a9c5-45c3-a9c6-22de2fe3162c", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 38, + "Y": 374 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Set tasks for stock", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "if(!stocksInLocation.Any(x => !x.ContainerId.HasValue)) #:{ #: foreach(Guid containerId in stocksInLocation.Select(x => x.ContainerId).Distinct().Where(x => x.HasValue)) #: { #: //START CST #: if(!countOrderLine.CountLocations.SelectMany(x => x.CountedStockHolderIds).Any(x => x.Value == containerId) && !currentCountLocation.Tasks.Any(x => x.ContainerId == containerId)) #: //END CST #: { #: ProductCountTaskDataWF task= new ProductCountTaskDataWF() #: { #: TaskId = Guid.NewGuid(), #: StationId = station?.Id, #: HolderId = containerId, #: LogisticAttributes = new StockLogisticAttributesWF() #: { #: Colour = countOrderLine.Color, #: LotCode = countOrderLine.LotCode, #: PostProductionTreatment = countOrderLine.PostProductionTreatment, #: Quality = countOrderLine.Quality, #: SerialNumber = countOrderLine.SerialNumber, #: Size = countOrderLine.Size, #: Source = countOrderLine.Source, #: Version = countOrderLine.Version #: } #: }; #: #: if(station == null && !currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: manualProductTasks.Add(task); #: } else if (station != null && currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: automaticProductTasks.Add(task); #: } #: } #: } #:} #:else #:{ #: if(!currentCountLocation.CountedStockHolderIds.Any(x => x.Value == currentCountLocation.LocationId) && !currentCountLocation.Tasks.Any()) #: { #: ProductCountTaskDataWF task= new ProductCountTaskDataWF() #: { #: TaskId = Guid.NewGuid(), #: StationId = station?.Id, #: HolderId = currentCountLocation.LocationId, #: LogisticAttributes = new StockLogisticAttributesWF() #: { #: Colour = countOrderLine.Color, #: LotCode = countOrderLine.LotCode, #: PostProductionTreatment = countOrderLine.PostProductionTreatment, #: Quality = countOrderLine.Quality, #: SerialNumber = countOrderLine.SerialNumber, #: Size = countOrderLine.Size, #: Source = countOrderLine.Source, #: Version = countOrderLine.Version #: } #: }; #: #: if(station == null && !currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: manualProductTasks.Add(task); #: } else if (station != null && currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: automaticProductTasks.Add(task); #: } #: } #:}", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticProductTasks" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "094a71af-04fc-4362-b385-815ed0342252", + "Name": "automaticProductTasks", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countOrderLine" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "89f6bded-d01a-4d0c-8b8d-f1ff1ca71b4f", + "Name": "countOrderLine", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-currentCountLocation" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "66dfbc0a-15f4-4e68-9feb-b9b8c31d8709", + "Name": "currentCountLocation", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualProductTasks" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "e9e4e4e7-df6d-47bd-acdb-33758e156669", + "Name": "manualProductTasks", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-station" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "1ef19dd0-d641-483d-9b04-3bfcca810320", + "Name": "station", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-stocksInLocation" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "d0172b19-b170-454c-80a8-cac05d619051", + "Name": "stocksInLocation", + "UseType": "Attribute" + } + ] + }, + "Guid": "9c4bf3a6-d7ca-45f1-897f-8b2cac9e9458", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "CST Set tasks for stock", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST_Set_tasks_for_stock-Next_location-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next location", + "ExceptionRollback": false, + "Guid": "89ec1d4e-6d59-472a-9a6a-d406d37dfb8d", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 158, + "Y": 474 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Init", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "Guard.That.Expression.IsTrue(countLineId != Guid.Empty, \"Count line id can not be empty\");", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countLineId" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "36cfb4ad-d860-4083-ba26-e748aad4fabd", + "Name": "countLineId", + "UseType": "Attribute" + } + ] + }, + "Guid": "32f73535-348a-427a-b997-ef8ee23bca1d", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Initiator", + "Limit": 0, + "Name": "Init", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Init-CST_Get_count_line-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Get count line", + "ExceptionRollback": false, + "Guid": "01028538-3cf5-418c-bf30-2d663408cc01", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 22 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next location", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "countLocationIndex++;", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countLocationIndex" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "a6abea83-2230-4c9b-9d7b-283aaec06f36", + "Name": "countLocationIndex", + "UseType": "Attribute" + } + ] + }, + "Guid": "f3e3458c-a976-4920-9e32-97289566bd9b", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Next location", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next_location-Iterate_count_locations-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 108.6, + "Y": 507.43 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 25.76, + "Y": 442.1 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 26, + "Y": 198 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 110.48, + "Y": 152.24 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Iterate count locations", + "ExceptionRollback": false, + "Guid": "8059f634-2a1f-4630-9e08-d184cc08f2c9", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 506 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-End", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowDecisionActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "7502a2a1-ca3d-4f99-957e-6031ef58b050", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "End", + "Priority": 0, + "SplitType": "Terminator", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Width": 48, + "X": 188, + "Y": 134 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Has picking locations?", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowDecisionActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "9d079c0b-2e57-491e-8bad-3d58179847e6", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Has picking locations?", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Has_picking_locations?-Get_stock_in_location-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get stock in location", + "ExceptionRollback": false, + "Guid": "01a8e53e-e58f-4a89-a488-0afffb6fa0d0", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Has_picking_locations?-Get_product_tasks_for_location_line-Yes-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "countOrderLine.IsLocationLine && currentCountLocation.IsDrawer && station == null #: #: #: #:", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get product tasks for location line", + "ExceptionRollback": false, + "Guid": "f7510116-7e9b-4c76-a27e-0aa1a2aebaed", + "Name": "Yes", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 158, + "Y": 374 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Iterate count locations", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowDecisionActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "901a4394-b1ec-4ad8-85ee-5461d6c3a252", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Iterate count locations", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Iterate_count_locations-End-No more locations-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-End", + "ExceptionRollback": false, + "Guid": "c8e66368-59a4-49ce-acc8-678e922b14dd", + "Name": "No more locations", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Iterate_count_locations-Get_count_location-More locations-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "countLocationIndex !x.IsLabeled)) #: #: #: #: #: #: #:", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Set tasks for location", + "ExceptionRollback": false, + "Guid": "b87ae4d7-f4d7-49b9-894a-f6fbc1ade352", + "Name": "Location", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Line_type?-Has_picking_locations?-Stock-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Has picking locations?", + "ExceptionRollback": false, + "Guid": "51a4c9e6-9936-4c6a-864b-42cb661db53f", + "Name": "Stock", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Line_type?-CST_Set_task_for_container-Container-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "countOrderLine.IsContainerLine", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Set task for container", + "ExceptionRollback": false, + "Guid": "49501f72-f05f-4aa2-b3e7-4263f4b0feef", + "Name": "Container", + "Sequence": 1 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 314 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Get count line", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countOrderLine" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countLineId" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Query-{4de6d144-11c4-4151-b685-a6931bf61db8}-countOrderLineId", + "Guid": "5cf7af5c-ec57-4461-9ad1-8ed860e42342", + "Name": "NoName", + "UseType": "Attribute" + } + ] + }, + "Guid": "39beb3ef-7f0d-40c7-abf7-b3d47a7c1277", + "Height": 24, + "ImplementationInternal": "Query-CountOrderLine_ById-{4de6d144-11c4-4151-b685-a6931bf61db8}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "CST Get count line", + "OrderBy": "", + "Priority": 0, + "Select": "x => new CountOrderLineWF(){ #: Id = x.Id, #: CountOrderId = x.CountOrderId, #: LineNumber=x.LineNumber, #: IsProductLine = (x.ProductId.HasValue && x.OwnerId.HasValue) || x.BestBeforeDateMax != null || x.BestBeforeDateMin != null || #: !string.IsNullOrEmpty(x.Color) || x.DaysOfLifeDateMax != null || x.DaysOfLifeDateMin != null || #: x.ExpirationDateMax != null || x.ExpirationDateMin != null || !string.IsNullOrEmpty(x.LotCode) || #: !string.IsNullOrEmpty(x.PostProductionTreatment) || !string.IsNullOrEmpty(x.ProductionMethod) || #: x.ProductionDateMax != null || x.ProductionDateMin != null || #: !string.IsNullOrEmpty(x.Quality) || !string.IsNullOrEmpty(x.SerialNumber) || !string.IsNullOrEmpty(x.Size) #: || !string.IsNullOrEmpty(x.Source) || !string.IsNullOrEmpty(x.Version), #: IsContainerLine = !((x.ProductId.HasValue && x.OwnerId.HasValue) || x.BestBeforeDateMax != null || x.BestBeforeDateMin != null || #: !string.IsNullOrEmpty(x.Color) || x.DaysOfLifeDateMax != null || x.DaysOfLifeDateMin != null || #: x.ExpirationDateMax != null || x.ExpirationDateMin != null || !string.IsNullOrEmpty(x.LotCode) || #: !string.IsNullOrEmpty(x.PostProductionTreatment) || !string.IsNullOrEmpty(x.ProductionMethod) || #: x.ProductionDateMax != null || x.ProductionDateMin != null || #: !string.IsNullOrEmpty(x.Quality) || !string.IsNullOrEmpty(x.SerialNumber) || !string.IsNullOrEmpty(x.Size) #: || !string.IsNullOrEmpty(x.Source) || !string.IsNullOrEmpty(x.Version)) && x.ContainerId.HasValue, #: IsLocationLine= !(x.ContainerId.HasValue) && !((x.ProductId.HasValue && x.OwnerId.HasValue) || x.BestBeforeDateMax != null || x.BestBeforeDateMin != null || #: !string.IsNullOrEmpty(x.Color) || x.DaysOfLifeDateMax != null || x.DaysOfLifeDateMin != null || #: x.ExpirationDateMax != null || x.ExpirationDateMin != null || !string.IsNullOrEmpty(x.LotCode) || #: !string.IsNullOrEmpty(x.PostProductionTreatment) || !string.IsNullOrEmpty(x.ProductionMethod) || #: x.ProductionDateMax != null || x.ProductionDateMin != null || #: !string.IsNullOrEmpty(x.Quality) || !string.IsNullOrEmpty(x.SerialNumber) || !string.IsNullOrEmpty(x.Size) #: || !string.IsNullOrEmpty(x.Source) || !string.IsNullOrEmpty(x.Version)), #: LotCode = x.LotCode, #: SerialNumber = x.SerialNumber, #: PostProductionTreatment = x.PostProductionTreatment, #: Version = x.Version, #: Source = x.Source, #: Size = x.Size, #: Quality = x.Quality, #: Color = x.Color, #: ContainerId = x.ContainerId, #: OwnerId = x.OwnerId, #: ProductId = x.ProductId, #:// START CST #:CountLocations= new CountLocationList(x.CountLocations.Select(cl=> new CountLocationWF() #:{ #: Id = cl.Id, #: CountedStockHolderIds = new GuidList(cl.CountedStockHolderIds.Select(y => new GuidWF(){Value = y})), #:})) #://END CST #:}", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST_Get_count_line-Iterate_count_locations-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Iterate count locations", + "ExceptionRollback": false, + "Guid": "f1ed371a-3fd1-4e07-9c56-7dc9dfc8cec0", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 82 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get count location", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-currentCountLocation" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "countOrderLine.CountLocations[(int)countLocationIndex].Id", + "FormalParameterInternal": "FOPA-Query-{f3acd488-6adc-4d24-ab85-579d8ea6db86}-countLocationId", + "Guid": "bc647970-5334-4e53-b4f2-335d20c66406", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "7fd3c5c6-3b63-4a1d-a879-7104d1c79dc5", + "Height": 24, + "ImplementationInternal": "Query-CountLocation_ById-{f3acd488-6adc-4d24-ab85-579d8ea6db86}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get count location", + "OrderBy": "", + "Priority": 0, + "Select": "x => new CountLocationWF() #:{ #: Id = x.Id, #: UnloadAisleAllowsOutput = x.Location.UnloadAisle != null ? x.Location.UnloadAisle.AllowOutput : false, #: UnloadAisleIsLocked = x.Location.UnloadAisle != null ? x.Location.UnloadAisle.IsLock : false, #: LocationId = x.LocationId, #: StationId = x.Location.StationId, #: LocationCode = x.Location.Code, #: LocationAllowCount = (x.Location as IStoreLocation).TransformOrDefault(z => #: z.LocationLocks.All(y => y.LocationLockType.IsCountAllowed && (y.LocationLockType.IsMoveAllowed || (z.LoadAisle != null && z.LoadAisle is IManualAisle))) && #: ((z.MyContainers.Any() && z.ContainersTotal.All(y => y.ContainerLocks.All(cl => cl.ContainerLockType.IsCountAllowed && cl.ContainerLockType.IsMoveAllowed || #: (z.LoadAisle != null && z.LoadAisle is IManualAisle)))) || z.StoreLocationLogic.AllowCount) && #: z.StockHolderStockTotal.All(y => (y.ReceptionDefaultStatus == null || (y.ReceptionDefaultStatus.AllowCount && (y.ReceptionDefaultStatus.AllowMove || (z.LoadAisle != null && z.LoadAisle is IManualAisle)))) && #: (y.UserDefinedStatus == null || y.UserDefinedStatus.AllowCount && (y.UserDefinedStatus.AllowMove || (z.LoadAisle != null && z.LoadAisle is IManualAisle))))), #: Location = new LocationWF(){ #: Id = x.Location.Id, #: Code = x.Location.Code, #: Containers = new ContainerList(x.Location.Containers.Select(y => new ContainerWF() #: { #: ContainerId = y.Id, #: Code = y.Code, #: })), #: UnloadAisle = new AisleWF(){ IsAutomatic = x.Location.UnloadAisle is IAutomaticAisle} #: }, #: Tasks = new TaskList(x.Tasks.Select(y => new TaskWF() #: { #: Id = y.Id, #: ContainerId = (y.StockHolderOrigin as IContainer)?.Id, #: ProductId = y.ProductConversion?.ProductId #: })), #: CountedStockHolderIds = new GuidList(x.CountedStockHolderIds.Select(y => new GuidWF(){Value = y})), #: CountedProductLocationIds = new GuidList(x.CountedProductLocationIds.Select(y => new GuidWF(){Value = y})), #: IsDrawer = x.Location is IStoreLocation ? ((IStoreLocation)x.Location).ProductLocations.Any() && !((IStoreLocation)x.Location).ProductLocations.Any(x => !x.IsLabeled) : false, #: ProductLocationList = x.Location is IStoreLocation ? new ProductLocationList(((IStoreLocation)x.Location).ProductLocations.Select( #: p => new ProductLocationWF(){ #: Id = p.Id, #: ProductId = p.Product.Id, #: ProductCode = p.Product.Code, #: CustomText = p.CustomText, #: IsLabeled = p.IsLabeled #: })) : new ProductLocationList(), #: LooseStock = new StockList(x.Location.StockHolderStockTotal.Where(st => st.StockHolder.HolderContainer != null ? !st.StockHolder.HolderContainer.IsClient : true).Select( #: s => new StockWF(){ #: StockId = s.Id, #: ProductId = s.ProductConversion.Product.Id, #: ProductLocationId = s.ProductLocationId #: })) #:}", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get_count_location-Get_station-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get station", + "ExceptionRollback": false, + "Guid": "e30b3dee-1ca8-4f0d-8796-d9be1e66f6f0", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 198 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get station", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-station" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "countOrderLine.CountOrderId", + "FormalParameterInternal": "FOPA-Query-{60382767-d4ab-4bff-a6eb-ee43f4a0e261}-countOrderId", + "Guid": "072ca6c3-d65e-4cf6-a3f5-21bff850819d", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "currentCountLocation.StationId", + "FormalParameterInternal": "FOPA-Query-{60382767-d4ab-4bff-a6eb-ee43f4a0e261}-stationFromId", + "Guid": "679d42a4-eb48-4928-b5aa-8bf47c39ab74", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "countOrderLine.IsProductLine ? \"ProductCount\" : \"ContainerCount\"", + "FormalParameterInternal": "FOPA-Query-{60382767-d4ab-4bff-a6eb-ee43f4a0e261}-taskType", + "Guid": "d875ea0b-2ab7-4a7a-9379-ab66dc2e3347", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "60c8c1b4-4754-4f35-abce-fcd12cce52ca", + "Height": 24, + "ImplementationInternal": "Query-PickingStation_GetForCount_V2-{60382767-d4ab-4bff-a6eb-ee43f4a0e261}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get station", + "OrderBy": "", + "Priority": 0, + "Select": "s => new StationWF() #:{ #: Id = s.Id, #: Code = s.Code #:}", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get_station-Line_type?-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Line type?", + "ExceptionRollback": false, + "Guid": "c1bd85c9-4a33-47e5-8be9-0b31751829b8", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 254 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get stock in location", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-stocksInLocation" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "currentCountLocation.LocationId", + "FormalParameterInternal": "FOPA-Query-{0abc1ec7-b44d-4e0c-822a-a228669ef328}-locationId", + "Guid": "6850af6a-4ab9-4edd-bfd8-57c0d596f4c9", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "countOrderLine.ProductId.GetValueOrDefault()", + "FormalParameterInternal": "FOPA-Query-{0abc1ec7-b44d-4e0c-822a-a228669ef328}-productId", + "Guid": "f7b54a72-7db6-418d-849b-04ba4031d6bf", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "024eab40-2b39-41b5-bf65-390bd64cecef", + "Height": 24, + "ImplementationInternal": "Query-Stocks_GetStockInHolderNotClient-{0abc1ec7-b44d-4e0c-822a-a228669ef328}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get stock in location", + "OrderBy": "", + "Priority": 0, + "Select": "x=> new StockWF(){ #: StockId = x.Id, #: ContainerId = x.StockHolder.HolderContainer?.Id, #: #:}", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get_stock_in_location-Next_location-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next location", + "ExceptionRollback": false, + "Guid": "3dfba8a6-bcb4-4eeb-9bb4-14482bf9ed86", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get_stock_in_location-CST_Set_tasks_for_stock-Valid-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "stocksInLocation.Any()", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Set tasks for stock", + "ExceptionRollback": false, + "Guid": "aa9fb0ae-1ff8-4f98-b68c-db7b626bc67b", + "Name": "Valid", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 158, + "Y": 426 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get product tasks for location line", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowSubProcessActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countOrderLine" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Workflow-{bd20b76a-ed5e-4c6e-b316-b06282e09ad0}-CountOrderLine", + "Guid": "2146e8cd-8f35-4770-8f96-9b71bc698962", + "Name": "NoName", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-currentCountLocation" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Workflow-{bd20b76a-ed5e-4c6e-b316-b06282e09ad0}-CurrentCountLocation", + "Guid": "df21d2ff-4d82-4677-8c8c-4f6876355d64", + "Name": "NoName", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualProductTasks" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Workflow-{bd20b76a-ed5e-4c6e-b316-b06282e09ad0}-ManualProductTasks", + "Guid": "ec4fdbb8-a2f5-483b-8d76-c2ef8cf33886", + "Name": "NoName", + "UseType": "Attribute" + } + ] + }, + "Guid": "a5dbeccf-dc6a-4deb-bdf9-cad8bbabc0a4", + "Height": 24, + "ImplementationInternal": "Workflow-CountOrder_GetProductTasksForCountLocationLine_PR-{bd20b76a-ed5e-4c6e-b316-b06282e09ad0}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get product tasks for location line", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "SubProcessAttributesAttribute": null, + "SubProcessModule": "", + "SubProcessNameAttribute": null, + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get_product_tasks_for_location_line-Next_location-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 249.2, + "Y": 450 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 222, + "Y": 518 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 146, + "Y": 518 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next location", + "ExceptionRollback": false, + "Guid": "04b64229-9a14-485c-9ceb-782ce4e7c340", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 230, + "Y": 426 + } + ] + }, + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "FOPA-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-AutomaticHolderTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticHolderTasks" + }, + "Description": "List of automatic holder tasks for the line (empty if no tasks)", + "EntityStereotypeInternal": "c254d428-6f03-4376-a356-375fcb5349cb", + "EntityStereotypeName": "HolderCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "IsRequiredParameter": false, + "Mode": "Out", + "Name": "AutomaticHolderTasks", + "Stereotype": "List", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-AutomaticProductTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticProductTasks" + }, + "Description": "List of automatic product tasks for the line (empty if no tasks)", + "EntityStereotypeInternal": "a8639390-98de-4824-a6df-473f281cd3e9", + "EntityStereotypeName": "ProductCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "IsRequiredParameter": false, + "Mode": "Out", + "Name": "AutomaticProductTasks", + "Stereotype": "List", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CountLineId", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countLineId" + }, + "Description": "(Required) Id of the count line", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "CountLineId", + "Stereotype": "Guid", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-ManualHolderTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualHolderTasks" + }, + "Description": "List of manual holder tasks for the line (empty if no tasks)", + "EntityStereotypeInternal": "c254d428-6f03-4376-a356-375fcb5349cb", + "EntityStereotypeName": "HolderCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "IsRequiredParameter": false, + "Mode": "Out", + "Name": "ManualHolderTasks", + "Stereotype": "List", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-ManualProductTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualProductTasks" + }, + "Description": "List of manual product tasks for the line (empty if no tasks)", + "EntityStereotypeInternal": "a8639390-98de-4824-a6df-473f281cd3e9", + "EntityStereotypeName": "ProductCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "IsRequiredParameter": false, + "Mode": "Out", + "Name": "ManualProductTasks", + "Stereotype": "List", + "WorkflowFormalParameterType": "UserCreated" + } + ] + }, + "Description": "For a given line, calculates destination stations for each of its locations.", + "DurationUnit": "Second", + "Limit": 0, + "Module": "", + "Name": "CountOrder_CalculateLineDestinationStations_PR", + "ValidFrom": "2015-04-20", + "VersionId": "cbbec5a8-3915-4be8-98b3-378e0cf1a1ce" +} \ No newline at end of file diff --git a/temp/workflow_CountOrder_CalculateLineDestinationStations_PR_v1_1770650759201.json b/temp/workflow_CountOrder_CalculateLineDestinationStations_PR_v1_1770650759201.json new file mode 100644 index 0000000..0e06fc0 --- /dev/null +++ b/temp/workflow_CountOrder_CalculateLineDestinationStations_PR_v1_1770650759201.json @@ -0,0 +1,1367 @@ +{ + "$id": "Workflow-CountOrder_CalculateLineDestinationStations_PR-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}.EasyBpart", + "$type": "Mecalux.ITSW.EasyBuilder.Workflow, Mecalux.ITSW.EasyBuilder.Model", + "AttributesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticHolderTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Automatic holder tasks", + "EntityStereotypeInternal": "c254d428-6f03-4376-a356-375fcb5349cb", + "EntityStereotypeName": "HolderCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "8f7a9cdf-1478-4355-933c-5821a79457fe", + "InitialValue": "new HolderCountTaskDataList()", + "Length": 0, + "Name": "automaticHolderTasks", + "Persist": true, + "Stereotype": "List" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticProductTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Automatic product tasks", + "EntityStereotypeInternal": "a8639390-98de-4824-a6df-473f281cd3e9", + "EntityStereotypeName": "ProductCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "d8adb5a0-42b3-496f-a514-d9b02cd45c1a", + "InitialValue": "new ProductCountTaskDataList()", + "Length": 0, + "Name": "automaticProductTasks", + "Persist": true, + "Stereotype": "List" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countLineId", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "(Required) Id of the count line", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "476f8a71-c783-46a6-9442-0e45e4afc4e4", + "InitialValue": "", + "Length": 100, + "Name": "countLineId", + "Persist": true, + "Stereotype": "Guid" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countLocationIndex", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Index to iterate line count locations.", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "Guid": "51b27bb4-3895-4bc6-8b46-a545ecbd7d1c", + "InitialValue": "0", + "Length": 0, + "Name": "countLocationIndex", + "Persist": true, + "Stereotype": "Integer" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countOrderLine", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Line for which destination stations will be calculated.", + "EntityStereotypeInternal": "bf66289f-cfdf-4eca-a8ab-bf1c3d586936", + "EntityStereotypeName": "CountOrderLineWF", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "88e18d3e-f71d-4367-b4f4-81069f5a1f4c", + "InitialValue": null, + "Length": 0, + "Name": "countOrderLine", + "Persist": true, + "Stereotype": "Record" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-currentCountLocation", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Description", + "EntityStereotypeInternal": "80ef96ec-0a15-482f-8c65-f81b48079c14", + "EntityStereotypeName": "CountLocationWF", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "f2570897-fa76-4e97-a811-0c8eaad51c13", + "InitialValue": null, + "Length": 0, + "Name": "currentCountLocation", + "Persist": true, + "Stereotype": "Record" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualHolderTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Manual holder tasks", + "EntityStereotypeInternal": "c254d428-6f03-4376-a356-375fcb5349cb", + "EntityStereotypeName": "HolderCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "3c7523ab-cf06-4208-b63f-ef0657683c22", + "InitialValue": "new HolderCountTaskDataList()", + "Length": 0, + "Name": "manualHolderTasks", + "Persist": true, + "Stereotype": "List" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualProductTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Manual product tasks", + "EntityStereotypeInternal": "a8639390-98de-4824-a6df-473f281cd3e9", + "EntityStereotypeName": "ProductCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "aa2c2ff8-3287-4d7c-be54-a4a9b913a687", + "InitialValue": "new ProductCountTaskDataList()", + "Length": 0, + "Name": "manualProductTasks", + "Persist": true, + "Stereotype": "List" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-station", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "Station to use in the query", + "EntityStereotypeInternal": "21bb1311-4dc6-4e8d-82da-6e486c337cac", + "EntityStereotypeName": "StationWF", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "602e9a76-2c5e-4129-a7eb-b379f80d5b1b", + "InitialValue": "null", + "Length": 0, + "Name": "station", + "Persist": true, + "Stereotype": "Record" + }, + { + "$id": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-stocksInLocation", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowInternalAttribute, Mecalux.ITSW.EasyBuilder.Model", + "Description": "List of stock in the location", + "EntityStereotypeInternal": "0a25785b-a966-45d0-81ed-2e79d21c486b", + "EntityStereotypeName": "StockList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "Guid": "9301c4dd-0c70-46be-801e-1ad38b4d5de4", + "InitialValue": "", + "Length": 100, + "Name": "stocksInLocation", + "Persist": true, + "Stereotype": "List" + } + ] + }, + "ActivitiesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivity, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Set task for container", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "//START CST #:if(currentCountLocation.Location.Containers.Any(x => x.ContainerId == countOrderLine.ContainerId.Value) && #: !currentCountLocation.CountedStockHolderIds.Any(x => x.Value == countOrderLine.ContainerId.Value) && #: !currentCountLocation.Tasks.Any() && #: currentCountLocation.LocationAllowCount) #:// END CST #:{ #: #: HolderCountTaskDataWF task= new HolderCountTaskDataWF() #: { #: TaskId=Guid.NewGuid(), #: StationId=station?.Id, #: HolderId=countOrderLine.ContainerId.Value #: }; #: #: if(station == null && !currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: manualHolderTasks.Add(task); #: } else if (station != null && currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: automaticHolderTasks.Add(task); #: } #:}", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticHolderTasks" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "e0d0e8d5-1a2a-47f5-a07f-157ffadf77a4", + "Name": "automaticHolderTasks", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countOrderLine" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "2eb8cc42-d49c-406e-bd20-95c5644ce864", + "Name": "countOrderLine", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-currentCountLocation" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "e9b17fe5-8fed-440a-a74a-12a88a5f2de5", + "Name": "currentCountLocation", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualHolderTasks" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "38d2ab46-b855-4635-8d33-0ed48854189e", + "Name": "manualHolderTasks", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-station" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "0b13acb3-c55c-465c-a0af-283865d7946d", + "Name": "station", + "UseType": "Attribute" + } + ] + }, + "Guid": "f588db93-7e05-4120-adf8-f48e51367dcf", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "CST Set task for container", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST_Set_task_for_container-Next_location-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next location", + "ExceptionRollback": false, + "Guid": "7d88f028-d851-4d14-bc2f-ed22f5ec064a", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 374 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Set tasks for location", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "if (station == null && !currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: if(!currentCountLocation.CountedStockHolderIds.Any(x => x.Value == currentCountLocation.LocationId) && !currentCountLocation.Tasks.Any() && currentCountLocation.LocationAllowCount) #: { #: HolderCountTaskDataWF task= new HolderCountTaskDataWF() #: { #: TaskId=Guid.NewGuid(), #: StationId=null, #: HolderId=currentCountLocation.LocationId #: }; #: #: manualHolderTasks.Add(task); #: } #:} else if (station != null && currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: if(currentCountLocation.LocationAllowCount) #: { #: foreach (Guid containerId in currentCountLocation.Location.Containers.Select(x => x.ContainerId).Distinct()) #: { #: //START CST #: if(!countOrderLine.CountLocations #: .SelectMany(x => x.CountedStockHolderIds) #: .Any(x => x.Value == containerId) && #: !currentCountLocation.Tasks.Any(x => x.ContainerId == containerId)) #: //END CST #: { #: HolderCountTaskDataWF task= new HolderCountTaskDataWF() #: { #: TaskId = Guid.NewGuid(), #: StationId = station.Id, #: HolderId = containerId #: }; #: #: automaticHolderTasks.Add(task); #: } #: } #: } #:}", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticHolderTasks" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "b578a5f4-64a7-46f5-b917-2347ba8d6462", + "Name": "automaticHolderTasks", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countOrderLine" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "1b98d93d-1d73-470b-9b58-754d8043f1f2", + "Name": "countOrderLine", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-currentCountLocation" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "34e0b029-4755-479d-a00c-c84175198780", + "Name": "currentCountLocation", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualHolderTasks" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "42fb9a4a-73f5-4fe6-8d1c-f266af2f5f30", + "Name": "manualHolderTasks", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-station" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "b5a042ec-0cb1-4585-8650-fda4ab34c93f", + "Name": "station", + "UseType": "Attribute" + } + ] + }, + "Guid": "817a7cca-d952-4772-a61b-c5399b2bdde3", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "CST Set tasks for location", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST_Set_tasks_for_location-Next_location-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next location", + "ExceptionRollback": false, + "Guid": "fd3fa2f5-a9c5-45c3-a9c6-22de2fe3162c", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 38, + "Y": 374 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Set tasks for stock", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "if(!stocksInLocation.Any(x => !x.ContainerId.HasValue)) #:{ #: foreach(Guid containerId in stocksInLocation.Select(x => x.ContainerId).Distinct().Where(x => x.HasValue)) #: { #: //START CST #: if(!countOrderLine.CountLocations.SelectMany(x => x.CountedStockHolderIds).Any(x => x.Value == containerId) && !currentCountLocation.Tasks.Any(x => x.ContainerId == containerId)) #: //END CST #: { #: ProductCountTaskDataWF task= new ProductCountTaskDataWF() #: { #: TaskId = Guid.NewGuid(), #: StationId = station?.Id, #: HolderId = containerId, #: LogisticAttributes = new StockLogisticAttributesWF() #: { #: Colour = countOrderLine.Color, #: LotCode = countOrderLine.LotCode, #: PostProductionTreatment = countOrderLine.PostProductionTreatment, #: Quality = countOrderLine.Quality, #: SerialNumber = countOrderLine.SerialNumber, #: Size = countOrderLine.Size, #: Source = countOrderLine.Source, #: Version = countOrderLine.Version #: } #: }; #: #: if(station == null && !currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: manualProductTasks.Add(task); #: } else if (station != null && currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: automaticProductTasks.Add(task); #: } #: } #: } #:} #:else #:{ #: if(!currentCountLocation.CountedStockHolderIds.Any(x => x.Value == currentCountLocation.LocationId) && !currentCountLocation.Tasks.Any()) #: { #: ProductCountTaskDataWF task= new ProductCountTaskDataWF() #: { #: TaskId = Guid.NewGuid(), #: StationId = station?.Id, #: HolderId = currentCountLocation.LocationId, #: LogisticAttributes = new StockLogisticAttributesWF() #: { #: Colour = countOrderLine.Color, #: LotCode = countOrderLine.LotCode, #: PostProductionTreatment = countOrderLine.PostProductionTreatment, #: Quality = countOrderLine.Quality, #: SerialNumber = countOrderLine.SerialNumber, #: Size = countOrderLine.Size, #: Source = countOrderLine.Source, #: Version = countOrderLine.Version #: } #: }; #: #: if(station == null && !currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: manualProductTasks.Add(task); #: } else if (station != null && currentCountLocation.Location.UnloadAisle.IsAutomatic){ #: automaticProductTasks.Add(task); #: } #: } #:}", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticProductTasks" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "094a71af-04fc-4362-b385-815ed0342252", + "Name": "automaticProductTasks", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countOrderLine" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "89f6bded-d01a-4d0c-8b8d-f1ff1ca71b4f", + "Name": "countOrderLine", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-currentCountLocation" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "66dfbc0a-15f4-4e68-9feb-b9b8c31d8709", + "Name": "currentCountLocation", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualProductTasks" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "e9e4e4e7-df6d-47bd-acdb-33758e156669", + "Name": "manualProductTasks", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-station" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "1ef19dd0-d641-483d-9b04-3bfcca810320", + "Name": "station", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-stocksInLocation" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "d0172b19-b170-454c-80a8-cac05d619051", + "Name": "stocksInLocation", + "UseType": "Attribute" + } + ] + }, + "Guid": "9c4bf3a6-d7ca-45f1-897f-8b2cac9e9458", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "CST Set tasks for stock", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST_Set_tasks_for_stock-Next_location-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next location", + "ExceptionRollback": false, + "Guid": "89ec1d4e-6d59-472a-9a6a-d406d37dfb8d", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 158, + "Y": 474 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Init", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "Guard.That.Expression.IsTrue(countLineId != Guid.Empty, \"Count line id can not be empty\");", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countLineId" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "36cfb4ad-d860-4083-ba26-e748aad4fabd", + "Name": "countLineId", + "UseType": "Attribute" + } + ] + }, + "Guid": "32f73535-348a-427a-b997-ef8ee23bca1d", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Initiator", + "Limit": 0, + "Name": "Init", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Init-CST_Get_count_line-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Get count line", + "ExceptionRollback": false, + "Guid": "01028538-3cf5-418c-bf30-2d663408cc01", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 22 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next location", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowCodeActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "Expression": "countLocationIndex++;", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countLocationIndex" + }, + "Expression": "", + "FormalParameterInternal": null, + "Guid": "a6abea83-2230-4c9b-9d7b-283aaec06f36", + "Name": "countLocationIndex", + "UseType": "Attribute" + } + ] + }, + "Guid": "f3e3458c-a976-4920-9e32-97289566bd9b", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Next location", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next_location-Iterate_count_locations-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 108.6, + "Y": 507.43 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 25.76, + "Y": 442.1 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 26, + "Y": 198 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 110.48, + "Y": 152.24 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Iterate count locations", + "ExceptionRollback": false, + "Guid": "8059f634-2a1f-4630-9e08-d184cc08f2c9", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 506 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-End", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowDecisionActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "7502a2a1-ca3d-4f99-957e-6031ef58b050", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "End", + "Priority": 0, + "SplitType": "Terminator", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Width": 48, + "X": 188, + "Y": 134 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Has picking locations?", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowDecisionActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "9d079c0b-2e57-491e-8bad-3d58179847e6", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Has picking locations?", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Has_picking_locations?-Get_stock_in_location-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get stock in location", + "ExceptionRollback": false, + "Guid": "01a8e53e-e58f-4a89-a488-0afffb6fa0d0", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Has_picking_locations?-Get_product_tasks_for_location_line-Yes-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "countOrderLine.IsLocationLine && currentCountLocation.IsDrawer && station == null #: #: #: #:", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get product tasks for location line", + "ExceptionRollback": false, + "Guid": "f7510116-7e9b-4c76-a27e-0aa1a2aebaed", + "Name": "Yes", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 158, + "Y": 374 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Iterate count locations", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowDecisionActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Guid": "901a4394-b1ec-4ad8-85ee-5461d6c3a252", + "Height": 24, + "ImplementationInternal": null, + "JoinType": "Xor", + "Limit": 0, + "Name": "Iterate count locations", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Iterate_count_locations-End-No more locations-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-End", + "ExceptionRollback": false, + "Guid": "c8e66368-59a4-49ce-acc8-678e922b14dd", + "Name": "No more locations", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Iterate_count_locations-Get_count_location-More locations-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "countLocationIndex !x.IsLabeled)) #: #: #: #: #: #: #:", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Set tasks for location", + "ExceptionRollback": false, + "Guid": "b87ae4d7-f4d7-49b9-894a-f6fbc1ade352", + "Name": "Location", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Line_type?-Has_picking_locations?-Stock-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Has picking locations?", + "ExceptionRollback": false, + "Guid": "51a4c9e6-9936-4c6a-864b-42cb661db53f", + "Name": "Stock", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Line_type?-CST_Set_task_for_container-Container-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "countOrderLine.IsContainerLine", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Set task for container", + "ExceptionRollback": false, + "Guid": "49501f72-f05f-4aa2-b3e7-4263f4b0feef", + "Name": "Container", + "Sequence": 1 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 314 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Get count line", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countOrderLine" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countLineId" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Query-{4de6d144-11c4-4151-b685-a6931bf61db8}-countOrderLineId", + "Guid": "5cf7af5c-ec57-4461-9ad1-8ed860e42342", + "Name": "NoName", + "UseType": "Attribute" + } + ] + }, + "Guid": "39beb3ef-7f0d-40c7-abf7-b3d47a7c1277", + "Height": 24, + "ImplementationInternal": "Query-CountOrderLine_ById-{4de6d144-11c4-4151-b685-a6931bf61db8}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "CST Get count line", + "OrderBy": "", + "Priority": 0, + "Select": "x => new CountOrderLineWF(){ #: Id = x.Id, #: CountOrderId = x.CountOrderId, #: LineNumber=x.LineNumber, #: IsProductLine = (x.ProductId.HasValue && x.OwnerId.HasValue) || x.BestBeforeDateMax != null || x.BestBeforeDateMin != null || #: !string.IsNullOrEmpty(x.Color) || x.DaysOfLifeDateMax != null || x.DaysOfLifeDateMin != null || #: x.ExpirationDateMax != null || x.ExpirationDateMin != null || !string.IsNullOrEmpty(x.LotCode) || #: !string.IsNullOrEmpty(x.PostProductionTreatment) || !string.IsNullOrEmpty(x.ProductionMethod) || #: x.ProductionDateMax != null || x.ProductionDateMin != null || #: !string.IsNullOrEmpty(x.Quality) || !string.IsNullOrEmpty(x.SerialNumber) || !string.IsNullOrEmpty(x.Size) #: || !string.IsNullOrEmpty(x.Source) || !string.IsNullOrEmpty(x.Version), #: IsContainerLine = !((x.ProductId.HasValue && x.OwnerId.HasValue) || x.BestBeforeDateMax != null || x.BestBeforeDateMin != null || #: !string.IsNullOrEmpty(x.Color) || x.DaysOfLifeDateMax != null || x.DaysOfLifeDateMin != null || #: x.ExpirationDateMax != null || x.ExpirationDateMin != null || !string.IsNullOrEmpty(x.LotCode) || #: !string.IsNullOrEmpty(x.PostProductionTreatment) || !string.IsNullOrEmpty(x.ProductionMethod) || #: x.ProductionDateMax != null || x.ProductionDateMin != null || #: !string.IsNullOrEmpty(x.Quality) || !string.IsNullOrEmpty(x.SerialNumber) || !string.IsNullOrEmpty(x.Size) #: || !string.IsNullOrEmpty(x.Source) || !string.IsNullOrEmpty(x.Version)) && x.ContainerId.HasValue, #: IsLocationLine= !(x.ContainerId.HasValue) && !((x.ProductId.HasValue && x.OwnerId.HasValue) || x.BestBeforeDateMax != null || x.BestBeforeDateMin != null || #: !string.IsNullOrEmpty(x.Color) || x.DaysOfLifeDateMax != null || x.DaysOfLifeDateMin != null || #: x.ExpirationDateMax != null || x.ExpirationDateMin != null || !string.IsNullOrEmpty(x.LotCode) || #: !string.IsNullOrEmpty(x.PostProductionTreatment) || !string.IsNullOrEmpty(x.ProductionMethod) || #: x.ProductionDateMax != null || x.ProductionDateMin != null || #: !string.IsNullOrEmpty(x.Quality) || !string.IsNullOrEmpty(x.SerialNumber) || !string.IsNullOrEmpty(x.Size) #: || !string.IsNullOrEmpty(x.Source) || !string.IsNullOrEmpty(x.Version)), #: LotCode = x.LotCode, #: SerialNumber = x.SerialNumber, #: PostProductionTreatment = x.PostProductionTreatment, #: Version = x.Version, #: Source = x.Source, #: Size = x.Size, #: Quality = x.Quality, #: Color = x.Color, #: ContainerId = x.ContainerId, #: OwnerId = x.OwnerId, #: ProductId = x.ProductId, #:// START CST #:CountLocations= new CountLocationList(x.CountLocations.Select(cl=> new CountLocationWF() #:{ #: Id = cl.Id, #: CountedStockHolderIds = new GuidList(cl.CountedStockHolderIds.Select(y => new GuidWF(){Value = y})), #:})) #://END CST #:}", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST_Get_count_line-Iterate_count_locations-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Iterate count locations", + "ExceptionRollback": false, + "Guid": "f1ed371a-3fd1-4e07-9c56-7dc9dfc8cec0", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 82 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get count location", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-currentCountLocation" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "countOrderLine.CountLocations[(int)countLocationIndex].Id", + "FormalParameterInternal": "FOPA-Query-{f3acd488-6adc-4d24-ab85-579d8ea6db86}-countLocationId", + "Guid": "bc647970-5334-4e53-b4f2-335d20c66406", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "7fd3c5c6-3b63-4a1d-a879-7104d1c79dc5", + "Height": 24, + "ImplementationInternal": "Query-CountLocation_ById-{f3acd488-6adc-4d24-ab85-579d8ea6db86}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get count location", + "OrderBy": "", + "Priority": 0, + "Select": "x => new CountLocationWF() #:{ #: Id = x.Id, #: UnloadAisleAllowsOutput = x.Location.UnloadAisle != null ? x.Location.UnloadAisle.AllowOutput : false, #: UnloadAisleIsLocked = x.Location.UnloadAisle != null ? x.Location.UnloadAisle.IsLock : false, #: LocationId = x.LocationId, #: StationId = x.Location.StationId, #: LocationCode = x.Location.Code, #: LocationAllowCount = (x.Location as IStoreLocation).TransformOrDefault(z => #: z.LocationLocks.All(y => y.LocationLockType.IsCountAllowed && (y.LocationLockType.IsMoveAllowed || (z.LoadAisle != null && z.LoadAisle is IManualAisle))) && #: ((z.MyContainers.Any() && z.ContainersTotal.All(y => y.ContainerLocks.All(cl => cl.ContainerLockType.IsCountAllowed && cl.ContainerLockType.IsMoveAllowed || #: (z.LoadAisle != null && z.LoadAisle is IManualAisle)))) || z.StoreLocationLogic.AllowCount) && #: z.StockHolderStockTotal.All(y => (y.ReceptionDefaultStatus == null || (y.ReceptionDefaultStatus.AllowCount && (y.ReceptionDefaultStatus.AllowMove || (z.LoadAisle != null && z.LoadAisle is IManualAisle)))) && #: (y.UserDefinedStatus == null || y.UserDefinedStatus.AllowCount && (y.UserDefinedStatus.AllowMove || (z.LoadAisle != null && z.LoadAisle is IManualAisle))))), #: Location = new LocationWF(){ #: Id = x.Location.Id, #: Code = x.Location.Code, #: Containers = new ContainerList(x.Location.Containers.Select(y => new ContainerWF() #: { #: ContainerId = y.Id, #: Code = y.Code, #: })), #: UnloadAisle = new AisleWF(){ IsAutomatic = x.Location.UnloadAisle is IAutomaticAisle} #: }, #: Tasks = new TaskList(x.Tasks.Select(y => new TaskWF() #: { #: Id = y.Id, #: ContainerId = (y.StockHolderOrigin as IContainer)?.Id, #: ProductId = y.ProductConversion?.ProductId #: })), #: CountedStockHolderIds = new GuidList(x.CountedStockHolderIds.Select(y => new GuidWF(){Value = y})), #: CountedProductLocationIds = new GuidList(x.CountedProductLocationIds.Select(y => new GuidWF(){Value = y})), #: IsDrawer = x.Location is IStoreLocation ? ((IStoreLocation)x.Location).ProductLocations.Any() && !((IStoreLocation)x.Location).ProductLocations.Any(x => !x.IsLabeled) : false, #: ProductLocationList = x.Location is IStoreLocation ? new ProductLocationList(((IStoreLocation)x.Location).ProductLocations.Select( #: p => new ProductLocationWF(){ #: Id = p.Id, #: ProductId = p.Product.Id, #: ProductCode = p.Product.Code, #: CustomText = p.CustomText, #: IsLabeled = p.IsLabeled #: })) : new ProductLocationList(), #: LooseStock = new StockList(x.Location.StockHolderStockTotal.Where(st => st.StockHolder.HolderContainer != null ? !st.StockHolder.HolderContainer.IsClient : true).Select( #: s => new StockWF(){ #: StockId = s.Id, #: ProductId = s.ProductConversion.Product.Id, #: ProductLocationId = s.ProductLocationId #: })) #:}", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get_count_location-Get_station-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get station", + "ExceptionRollback": false, + "Guid": "e30b3dee-1ca8-4f0d-8796-d9be1e66f6f0", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 198 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get station", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-station" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "countOrderLine.CountOrderId", + "FormalParameterInternal": "FOPA-Query-{60382767-d4ab-4bff-a6eb-ee43f4a0e261}-countOrderId", + "Guid": "072ca6c3-d65e-4cf6-a3f5-21bff850819d", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "currentCountLocation.StationId", + "FormalParameterInternal": "FOPA-Query-{60382767-d4ab-4bff-a6eb-ee43f4a0e261}-stationFromId", + "Guid": "679d42a4-eb48-4928-b5aa-8bf47c39ab74", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "countOrderLine.IsProductLine ? \"ProductCount\" : \"ContainerCount\"", + "FormalParameterInternal": "FOPA-Query-{60382767-d4ab-4bff-a6eb-ee43f4a0e261}-taskType", + "Guid": "d875ea0b-2ab7-4a7a-9379-ab66dc2e3347", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "60c8c1b4-4754-4f35-abce-fcd12cce52ca", + "Height": 24, + "ImplementationInternal": "Query-PickingStation_GetForCount_V2-{60382767-d4ab-4bff-a6eb-ee43f4a0e261}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get station", + "OrderBy": "", + "Priority": 0, + "Select": "s => new StationWF() #:{ #: Id = s.Id, #: Code = s.Code #:}", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get_station-Line_type?-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Line type?", + "ExceptionRollback": false, + "Guid": "c1bd85c9-4a33-47e5-8be9-0b31751829b8", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 98, + "Y": 254 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get stock in location", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowQueryActivity, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-stocksInLocation" + }, + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "currentCountLocation.LocationId", + "FormalParameterInternal": "FOPA-Query-{0abc1ec7-b44d-4e0c-822a-a228669ef328}-locationId", + "Guid": "6850af6a-4ab9-4edd-bfd8-57c0d596f4c9", + "Name": "NoName", + "UseType": "Expression" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": null, + "Expression": "countOrderLine.ProductId.GetValueOrDefault()", + "FormalParameterInternal": "FOPA-Query-{0abc1ec7-b44d-4e0c-822a-a228669ef328}-productId", + "Guid": "f7b54a72-7db6-418d-849b-04ba4031d6bf", + "Name": "NoName", + "UseType": "Expression" + } + ] + }, + "Guid": "024eab40-2b39-41b5-bf65-390bd64cecef", + "Height": 24, + "ImplementationInternal": "Query-Stocks_GetStockInHolderNotClient-{0abc1ec7-b44d-4e0c-822a-a228669ef328}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get stock in location", + "OrderBy": "", + "Priority": 0, + "Select": "x=> new StockWF(){ #: StockId = x.Id, #: ContainerId = x.StockHolder.HolderContainer?.Id, #: #:}", + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get_stock_in_location-Next_location-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next location", + "ExceptionRollback": false, + "Guid": "3dfba8a6-bcb4-4eeb-9bb4-14482bf9ed86", + "Name": "Continue", + "Sequence": 0 + }, + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get_stock_in_location-CST_Set_tasks_for_stock-Valid-Condition", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "stocksInLocation.Any()", + "ConditionType": "Condition", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CST Set tasks for stock", + "ExceptionRollback": false, + "Guid": "aa9fb0ae-1ff8-4f98-b68c-db7b626bc67b", + "Name": "Valid", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 158, + "Y": 426 + }, + { + "$id": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get product tasks for location line", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowSubProcessActivity, Mecalux.ITSW.EasyBuilder.Model", + "CreationDelay": null, + "DeadlinesInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActivityDeadline, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [] + }, + "Description": "", + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countOrderLine" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Workflow-{bd20b76a-ed5e-4c6e-b316-b06282e09ad0}-CountOrderLine", + "Guid": "2146e8cd-8f35-4770-8f96-9b71bc698962", + "Name": "NoName", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-currentCountLocation" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Workflow-{bd20b76a-ed5e-4c6e-b316-b06282e09ad0}-CurrentCountLocation", + "Guid": "df21d2ff-4d82-4677-8c8c-4f6876355d64", + "Name": "NoName", + "UseType": "Attribute" + }, + { + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowActualParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualProductTasks" + }, + "Expression": "", + "FormalParameterInternal": "FOPA-Workflow-{bd20b76a-ed5e-4c6e-b316-b06282e09ad0}-ManualProductTasks", + "Guid": "ec4fdbb8-a2f5-483b-8d76-c2ef8cf33886", + "Name": "NoName", + "UseType": "Attribute" + } + ] + }, + "Guid": "a5dbeccf-dc6a-4deb-bdf9-cad8bbabc0a4", + "Height": 24, + "ImplementationInternal": "Workflow-CountOrder_GetProductTasksForCountLocationLine_PR-{bd20b76a-ed5e-4c6e-b316-b06282e09ad0}.EasyBpart", + "JoinType": "Xor", + "Limit": 0, + "Name": "Get product tasks for location line", + "Priority": 0, + "SplitType": "Xor", + "StartMode": "Automatic", + "SubflowExecutionMode": "Sync", + "SubProcessAttributesAttribute": null, + "SubProcessModule": "", + "SubProcessNameAttribute": null, + "TerminationMode": "Automatic", + "TransitionsInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "Transition-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Get_product_tasks_for_location_line-Next_location-Continue-Otherwise", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowTransition, Mecalux.ITSW.EasyBuilder.Model", + "Condition": "", + "ConditionType": "Otherwise", + "ControlPoints": { + "$type": "System.Collections.Generic.List`1[[System.Drawing.PointF, System.Drawing]], mscorlib", + "$values": [ + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 249.2, + "Y": 450 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 222, + "Y": 518 + }, + { + "$type": "System.Drawing.PointF, System.Drawing", + "IsEmpty": false, + "X": 146, + "Y": 518 + } + ] + }, + "Description": "", + "DestinyWorkflowActivityInternal": "Activity-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-Next location", + "ExceptionRollback": false, + "Guid": "04b64229-9a14-485c-9ceb-782ce4e7c340", + "Name": "Continue", + "Sequence": 0 + } + ] + }, + "Width": 48, + "X": 230, + "Y": 426 + } + ] + }, + "FormalParametersInternal": { + "$type": "System.Collections.Generic.List`1[[Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model]], mscorlib", + "$values": [ + { + "$id": "FOPA-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-AutomaticHolderTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticHolderTasks" + }, + "Description": "List of automatic holder tasks for the line (empty if no tasks)", + "EntityStereotypeInternal": "c254d428-6f03-4376-a356-375fcb5349cb", + "EntityStereotypeName": "HolderCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "IsRequiredParameter": false, + "Mode": "Out", + "Name": "AutomaticHolderTasks", + "Stereotype": "List", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-AutomaticProductTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-automaticProductTasks" + }, + "Description": "List of automatic product tasks for the line (empty if no tasks)", + "EntityStereotypeInternal": "a8639390-98de-4824-a6df-473f281cd3e9", + "EntityStereotypeName": "ProductCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "IsRequiredParameter": false, + "Mode": "Out", + "Name": "AutomaticProductTasks", + "Stereotype": "List", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-CountLineId", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-countLineId" + }, + "Description": "(Required) Id of the count line", + "EntityStereotypeInternal": "4740ce9f-bdfe-4ce6-b485-05b93cb9de57", + "IsRequiredParameter": false, + "Mode": "In", + "Name": "CountLineId", + "Stereotype": "Guid", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-ManualHolderTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualHolderTasks" + }, + "Description": "List of manual holder tasks for the line (empty if no tasks)", + "EntityStereotypeInternal": "c254d428-6f03-4376-a356-375fcb5349cb", + "EntityStereotypeName": "HolderCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "IsRequiredParameter": false, + "Mode": "Out", + "Name": "ManualHolderTasks", + "Stereotype": "List", + "WorkflowFormalParameterType": "UserCreated" + }, + { + "$id": "FOPA-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-ManualProductTasks", + "$type": "Mecalux.ITSW.EasyBuilder.WorkflowFormalParameter, Mecalux.ITSW.EasyBuilder.Model", + "Attribute": { + "$ref": "Attribute-Workflow-{cbbec5a8-3915-4be8-98b3-378e0cf1a1ce}-manualProductTasks" + }, + "Description": "List of manual product tasks for the line (empty if no tasks)", + "EntityStereotypeInternal": "a8639390-98de-4824-a6df-473f281cd3e9", + "EntityStereotypeName": "ProductCountTaskDataList", + "EntityStereotypeOriginApplicationName": "EasyWMS", + "IsRequiredParameter": false, + "Mode": "Out", + "Name": "ManualProductTasks", + "Stereotype": "List", + "WorkflowFormalParameterType": "UserCreated" + } + ] + }, + "Description": "For a given line, calculates destination stations for each of its locations.", + "DurationUnit": "Second", + "Limit": 0, + "Module": "", + "Name": "CountOrder_CalculateLineDestinationStations_PR", + "ValidFrom": "2015-04-20", + "VersionId": "cbbec5a8-3915-4be8-98b3-378e0cf1a1ce" +} \ No newline at end of file diff --git a/test-ad-api.ps1 b/test-ad-api.ps1 new file mode 100644 index 0000000..09392df --- /dev/null +++ b/test-ad-api.ps1 @@ -0,0 +1,186 @@ +# AD API Testing Script +# Tests each Application Dictionary element type endpoint + +# Configuration +$baseUrl = "https://localhost" +$tokenUrl = "$baseUrl/EasySTS/OAuth/Token" +$adApiBase = "$baseUrl/AD/api" +$auth = "Basic R05BOklFNGU3aXFoZHQ=" +$username = "mecalux" +$password = "ANDREZmlx6" +$tenant = "AD" +$application = "EasyWMS" + +# Skip SSL certificate validation (self-signed cert) +[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} +Add-Type @" + using System.Net; + using System.Security.Cryptography.X509Certificates; + public class TrustAllCertsPolicy : ICertificatePolicy { + public bool CheckValidationResult( + ServicePoint srvPoint, X509Certificate certificate, + WebRequest request, int certificateProblem) { + return true; + } + } +"@ +[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy + +Write-Host "`n=== Getting OAuth Token ===" -ForegroundColor Cyan + +# Get OAuth token +$tokenBody = @{ + grant_type = "password" + tenant_code = $tenant + username = $username + password = $password +} + +try { + $tokenResponse = Invoke-RestMethod -Uri $tokenUrl -Method Post -Headers @{ + "Authorization" = $auth + "Content-Type" = "application/x-www-form-urlencoded" + } -Body $tokenBody + + $token = $tokenResponse.access_token + Write-Host "[OK] Token obtained successfully" -ForegroundColor Green + Write-Host " Token: $($token.Substring(0, 50))..." -ForegroundColor Gray +} +catch { + Write-Host "[FAIL] Failed to get token: $($_.Exception.Message)" -ForegroundColor Red + exit 1 +} + +# Element types to test (only non-zero counts from screenshot) +$elementTypes = @( + @{Name="Command"; Count=1872}, + @{Name="Dialog"; Count=734}, + @{Name="Entity"; Count=331}, + @{Name="Event"; Count=1980}, + @{Name="FieldType"; Count=320}, + @{Name="Hook"; Count=60}, + @{Name="List"; Count=243}, + @{Name="Query"; Count=2016}, + @{Name="Record"; Count=337}, + @{Name="Relationship"; Count=49}, + @{Name="Report"; Count=67}, + @{Name="Resource"; Count=29374}, + @{Name="Subscription"; Count=500}, + @{Name="Validator"; Count=17}, + @{Name="ViewGroup"; Count=180}, + @{Name="View"; Count=373}, + @{Name="WorkflowAction"; Count=47}, + @{Name="Workflow"; Count=3712}, + @{Name="WritingModel"; Count=226} +) + +Write-Host "`n=== Testing AD API Endpoints ===" -ForegroundColor Cyan +Write-Host "Testing $($elementTypes.Count) element types`n" -ForegroundColor Gray + +$results = @() + +foreach ($type in $elementTypes) { + $typeName = $type.Name + $expectedCount = $type.Count + + Write-Host "Testing $typeName (expected: $expectedCount)..." -ForegroundColor Yellow -NoNewline + + $endpoint = "$adApiBase/$typeName/GetByApplication" + $body = @($application, $tenant, 10, 0) | ConvertTo-Json -Compress + + try { + $response = Invoke-RestMethod -Uri $endpoint -Method Post -Headers @{ + "Authorization" = "Bearer $token" + "Content-Type" = "application/json" + } -Body $body -TimeoutSec 30 + + $entities = $response.entities + $count = if ($entities) { $entities.Count } else { 0 } + + if ($count -gt 0) { + Write-Host " SUCCESS ($count elements)" -ForegroundColor Green + + # Show first element details + $firstElement = $entities[0] + $elementId = if ($firstElement.Id) { $firstElement.Id } else { $firstElement.id } + $elementName = if ($firstElement.Name) { $firstElement.Name } else { $firstElement.name } + $elementCode = if ($firstElement.Code) { $firstElement.Code } else { $firstElement.code } + + Write-Host " First element: ID=$elementId, Name=$elementName, Code=$elementCode" -ForegroundColor Gray + + $results += @{ + Type = $typeName + Status = "SUCCESS" + Count = $count + Expected = $expectedCount + FirstElement = @{ + Id = $elementId + Name = $elementName + Code = $elementCode + } + } + } + else { + Write-Host " No entities returned" -ForegroundColor DarkYellow + $results += @{ + Type = $typeName + Status = "EMPTY" + Count = 0 + Expected = $expectedCount + } + } + } + catch { + Write-Host " FAILED" -ForegroundColor Red + Write-Host " Error: $($_.Exception.Message)" -ForegroundColor DarkRed + $results += @{ + Type = $typeName + Status = "FAILED" + Error = $_.Exception.Message + Expected = $expectedCount + } + } + + Start-Sleep -Milliseconds 200 +} + +# Summary +Write-Host "`n=== Test Summary ===" -ForegroundColor Cyan +$successful = ($results | Where-Object { $_.Status -eq "SUCCESS" }).Count +$failed = ($results | Where-Object { $_.Status -eq "FAILED" }).Count +$empty = ($results | Where-Object { $_.Status -eq "EMPTY" }).Count + +Write-Host "Total tested: $($elementTypes.Count)" -ForegroundColor White +Write-Host "[OK] Successful: $successful" -ForegroundColor Green +Write-Host "[WARN] Empty: $empty" -ForegroundColor DarkYellow +Write-Host "[FAIL] Failed: $failed" -ForegroundColor Red + +# Detailed results +Write-Host "`n=== Detailed Results ===" -ForegroundColor Cyan +foreach ($result in $results) { + $status = switch ($result.Status) { + "SUCCESS" { "[OK]" } + "EMPTY" { "[WARN]" } + "FAILED" { "[FAIL]" } + } + + $color = switch ($result.Status) { + "SUCCESS" { "Green" } + "EMPTY" { "DarkYellow" } + "FAILED" { "Red" } + } + + Write-Host "$status $($result.Type): " -ForegroundColor $color -NoNewline + + if ($result.Status -eq "SUCCESS") { + Write-Host "$($result.Count) elements (expected: $($result.Expected))" -ForegroundColor Gray + } + elseif ($result.Status -eq "EMPTY") { + Write-Host "No data (expected: $($result.Expected))" -ForegroundColor Gray + } + else { + Write-Host "$($result.Error)" -ForegroundColor DarkRed + } +} + +Write-Host "`nTest completed.`n" -ForegroundColor Cyan