Start Workflow outside IYOPRO

Parent Previous Next

An IYOPRO Workflow may be started by two methods:

  1. A User completes a Form which is defined as workflow startup form
  2. An event triggers a Receive Message Start Event



Start Workflow by Form

To start a workflow by form, ensure that the workflow has been build and the desired form has been marked for workflow startup.


Then run the workflow out of IYOPRO. The form will appear. Copy the address line of the browser window to the clipboard. It should be something like this:


http://www.iyopro.com/iyopro/Form.aspx?formid=9999&sessionid=1bc489c7-39c4-48a4-9be4-8006dfd6700a&taskid=00000000-0000-0000-0000-000000000000&instanceid=4fb660a5-719c-4486-8a93-ccec711bae8e&wfid=11206


Paste the content into a notepad editor. Remove all tags after the question mark (?) except the wfid=xxxx entry. This entry specifies the target workflow id in IYOPRO. The result should look like this:


https://www.iyopro.com/iyopro/Form.aspx?wfid=11206


You may use this URL and embed it wherever you wish (i.e. as Bookmark in your browser). Whenever you activate the URL, you will be requested to log in to IYOPRO. Afterwards the requested form will be displayed.



If you want to work with an embedded form, you can just add "&embedded=true" to the URL.



Start Workflow by Form - independent of the different versions

To start a workflow regardless of the built versions, the same short URL applies as above. The difference lies in the numerical value of the "wfid". Instead of using the version-specific Workflow ID, the numeric value of the "wfid" is replaced by that of the Workflow File ID. The Workflow File ID is the same for each version.

Activation of the URL will now always start the version that has been set as Active Version.


The Workflow File ID can either be found in the corresponding column displayed in the Instance node of the Repository (if an instance of the workflow already exists) or in the File Properties of the "Bin" file of the workflow:




Start Workflow by Form and provide initial field values

As described in the section above a workflow with a start form can be invoked by an URL. If desired initial values for form fields can be provided via the additional URL parameter "userdata".

The form initialization is performed in the same way as if these values were set in a from load expression.


As there can be multiple fields in the form that should be initialized the initial values need to be provided as a python dictionary.

To enable this data structure to be transported as part of the URL the dictionary needs to be base64 encoded.

The base64 encoded dictionary is than appended to the URL as parameter userdata.


Please note that both the web browser and the web server define a maximum length for an URL. Typically this is about 2048 Byte. If the required initialization data exceeds this limit the URL can

also be invoked via HTTPS post.


Example:

Dictionary with the desired initial values:


{ "Form" : { "text1" : "Hallo", "text2": "World" } }


Base64 encoded dictionary:


eyAiRm9ybSIgOiB7ICJ0ZXh0MSIgOiAiSGFsbG8iLCAidGV4dDIiOiAiV29ybGQiIH0gfQ==


       Note: If used within an URL parameters the "=" character (used for padding by the base64 encoding) needs to be URL encoded as %3d.


       eyAiRm9ybSIgOiB7ICJ0ZXh0MSIgOiAiSGFsbG8iLCAidGV4dDIiOiAiV29ybGQiIH0gfQ%3d%3d


URL to invoke:


https://www.iyopro.com/iyopro/Form.aspx?wfid=11206&userdata=eyAiRm9ybSIgOiB7ICJ0ZXh0MSIgOiAiSGFsbG8iLCAidGV4dDIiOiAiV29ybGQiIH0gfQ%3d%d


As result the start form will be invoked and the form field "text1" and "text2" will be set to the initial values "Hello" and "World".



Start Workflow by Event

To start a Workflow by event ensure, that the Workflow has been build and it contains a Receive Message Start Event.

Follow the instructions given to trigger a message programmatically