Workflow from document flow

You can use a workflow activity to start a workflow as part of a document flow. For example, you can retrieve data on new products from an application database. Then run a workflow to review and approve the new product. After the new product is approved send it to another application for subsequent processing.

The results of the workflow can be incorporated in the document.

nt_diagram_ion_cn_workflow.png

In this example, the initial document can be:

<SyncMyProduct>
   <ApplicationArea>
      …
   </ApplicationArea>
   <DataArea>
      <Sync>
         …
      </Sync>
      <MyProduct>
         <ID>1234</ID>
         <Description>New Product</Description>
         <Link>http://somewhere/products?1234</Link>
      </MyProduct>
   </DataArea>
</SyncMyProduct>
The product ID, Description and Link can be used as input for the workflow. The new Status (either Approved or Rejected) can be output of the workflow. After the workflow is completed, this document is sent to the next step in the flow:
<SyncMyProduct>
   <ApplicationArea>
      …
   </ApplicationArea>
   <DataArea>
      <Sync>
         …
      </Sync>
      <MyProduct>
         <ID>1234</ID>
         <Description>New Product</Description>
         <Link>http://somewhere/products?1234</Link>
         <Status>Approved</Status>
      </MyProduct>
   </DataArea>
</SyncMyProduct>

In the workflow activity you select the workflow definition and link the input and output parameters of that workflow to attributes of the incoming document. You can pass structured information from the document (for example order lines) as input data for the workflow structures. The workflow structures cannot be used as output.

When a document arrives at this activity, a workflow is started. When the workflow is completed, the output of the workflow is added to the document and the document flow continues.

A workflow activity can also be used at the end of a document flow. In that case the workflow output (if any) is ignored. For example:

nt_diagram_ion_cn_workflow2.png

Multiple workflow activities can be used in a document flow. A workflow can be used in multiple workflow activities in a single document flow or in multiple document flows.