Sign inSign up

dailab/nemo-interpreter

By dailab

Updated almost 8 years ago

BPMN Interpreter Runtime for NeMo

Image
0

324

dailab/nemo-interpreter repository overview

The Interpreter Image has to be started after the Gateway, using

docker run -e gateway=<IP> -e interval=<N> \
           -e integrationBus=<URL> -e clientID=... -e clientSecret=... \
           -e authServer=<URL> -e requireAuthorization=<boolean> \
           dailab/nemo-interpreter

where <IP> is the public IP address of the computer running the Nemo Gateway Docker Image, and <N> is the agent's execution interval in milliseconds (optional, defaults to 100). The parameters clientID, clientSecret, integrationBusIP and authServer (the latter being optional) are needed for calling services via the NeMo Integration Bus.

The requireAuthorization parameter is optional and defaults to false. If it is set to true, a valid Access Token has to be provided in order to call any process.

The processes running on the interpreter can be invoked via REST, passing the name of the process and the input to the process as parameters using JSON as follows:

curl http://SERVER/api/NemoInterpreterAgent/callAnyProcess \
     -H "Content-Type: application/json" \
     -d '{"processName":"NAME OF PROCESS", "parameters":"CIM-STRING""}' 

where

  • NAME OF PROCESS is the name of the process to call
  • CIM-STRING is a string (!) holding a JSON dictionary mapping parameter names to values
  • the result is again a JSON dictionary mapping result names to values

Example:

curl http://RUNTIME_IP/api/NemoInterpreterAgent/callAnyProcess \
     -H "Content-Type: application/json" \
     -d '{"processName":"Orchestration", "parameters":"{\"user\":{\"eMAID\":\"Drive30\"}}"}'

If the Docker image has been started with requireAuthorization=true, a valid Access Token has to be provided in the Authorization header:

curl ... -H "Authorization: <Access Token>" ...

Note that parameters is not a JSON object, but a string representation of a JSON object, mapping parameter names to values. Also note that on Windows, the outer ' might not be allowed and you might have to use " and escape and double-escape all the nested ":

curl http://RUNTIME_IP/api/NemoInterpreterAgent/callAnyProcess \
     -H "Content-Type: application/json" \
     -d "{\"processName\":\"Orchestration\", \"parameters\":\"{\\\"user\\\":{\\\"eMAID\\\":\\\"Drive30\\\"}}\"}"

There's also a short description how to use the service hosted by the image itself, at:

http://RUNTIME_IP/api/NemoInterpreterAgent/callAnyProcess

Tag summary

Content type

Image

Digest

Size

92.7 MB

Last updated

almost 8 years ago

docker pull dailab/nemo-interpreter