5thIndustry - PROCEED-Labs/proceed GitHub Wiki

To allow for the use of 5thIndustry as an implementation for UserTasks we extended the engine and the MS.

Management System

The MS takes two new configuration values called _5thIndustryApplicationURL and _5thIndustryAPIURL. _5thIndustryApplicationURL is the address of the 5thIndustry Application and will be used to link users to the correct sites during process creation and execution. _5thIndustryAPIURL will be used to make requests to the 5thIndustry API to get the available Inspection Plans and Orders or trigger Inspection Orders during process execution. Both are written into the Process BPMN for use inside the engine.

Communication with 5thIndustry requires an authorization. To get this information one can either provide a new file called 5thIndustry-Service-Account.json inside the Config directory which has to contain the clientId and clientSecret of a 5thIndustry Service account as well as the endpoint from which the authorization tokens are to be requested. The other way is to provide the authorization token you get when you log into the 5thIndustry Application as the value of the user5thIndustryAuthorization user configuration entry. This token will become invalid after some time and a new token has to be entered.

Serialization

We allow 5thIndustry Data to be added as proceed:property elements inside a proceed:meta element. This allows to link an IuT-Plan to a Process or an Inspection Order to a User Task. There are multiple properties that are used for this which can be seen in the table below. Name refers to the value of the name attribute of the respective proceed:property element.

Name Target Element
_5i-API-Address Process
_5i-Application-Address Process
_5i-Inspection-Plan-ID Process
_5i-Inspection-Plan-Template-ID Process
_5i-Inspection-Plan-Title Process
_5i-Inspection-Order-ID User Task
_5i-Inspection-Order-Code User Task
_5i-Inspection-Order-Shortdescription User Task
_5i-Assembly-Group-ID User Task
_5i-Assembly-Group-Name User Task
_5i-Manufacturing-Step-ID User Task
_5i-Manufacturing-Step-Name User Task

At runtime, if the Engine needs to execute a UserTask, it recognizes a 5thIndustry task with the implementation attribute set to 5thIndustry. It will send a request to the 5thIndustry App to signal that the task has become active and the Inspection Order linked to it should be worked on. The engine periodically checks if the Inspection Order is finished and will mark the UserTask as finished when it is.

Engine

The Engine needs to authenticate to the 5th Industry app that it is allowed to send data. This Auth data is stored inside the MS and send to the Engine on an own endpoint. All other 5thIndustry data is inside the BPMN XML. (Technically: the Engine has no libary for GraphQL, just uses the REST lib)

The MS will send its service account data, if available, to allow the engine to renew its authorization when it becomes invalid. If there is no valid service account data the MS will send the authorization token of the current user. This token will become invalid after some time, which might be during the runtime of the process. This will make any subsequent requests to the 5thIndustry Application fail, thus preventing the process from continuing.

Open Topics:

  • in the 5th Industry App, if the project is moved manually into another column (e.g. project ends), this is not recognized by the MS yet
⚠️ **GitHub.com Fallback** ⚠️