Example Documentation Release Workflow

This section provides a step by step guide to create an example documentation release workflow. This process is used to review and deploy a published documentation into the IYOPRO portal.

The example process is described as follows:

NewItem807

Usage:

The author of a process documentation selects this workflow in the publishing dialog and completes the publishing task. IYOPRO will then start this release workflow.

The auditor receives a form where he can decline or release the documentation package. Depending on the decision either the decline or the release script task will be executed.

Create a BPI Project

A workflow is always the result of a BPI Project. So the first step is to create a new BPI Project in the team of the process documentation. Detailed information how to create BPI projects can you find here.

After you created the BPI-project add a form and a collaboration diagram to the project. The result should look like this:

NewItem808

Now edit the workflow properties and ensure, that this workflow is a documentation release workflow.

In the next chapter we edit the Check Form.

Check Form

Open the Check Form and add the following elements to the form:

NewItem814

Edit the properties of the form elements as follows:

  • Package Name TextBox Assign the VariableName PackageName to the input properties

  • View the package in IYOPRO Hyperlink Assign the VariableName PackageUrl to the link properties

  • My Decision RadioButton Assign the VariableName Released to the input properties

The variable names will be referred in the process diagram to respond to the users input.

In the next chapter we edit the release documentation process.

Release Documentation Process

Open the collaboration diagram and add the following shapes to the diagram:

NewItem807

In the next step it’s important to adjust the properties of the shapes so that they work as expected.

Check Documentation Activity

The check documentation activity is a user task which will request a decision from the auditor.

NewItem809

To complete this, perform the following steps:

Assign Form

To assign a form to the user task drag the form out of the process explorer over the user task in the collaboration diagram. Drop the form as soon as IYOPRO shows the marriage rings.

NewItem810

This will create a relation between the form and the task. The link is stored in the user task properties. You may also edit the link by your own if required.

NewItem811

Assign Participant

There are different ways how to define a participant. In this example we will use a role and assign all members of the package rewiewer group to that role.

To create a role open the Participant property. In the participant editor create a role named "Auditor" and assign it to the user task.

NewItem806

Prepare user task

The last step is to prepare the user task. To do this, open the user task expression property. Switch the language to Python and enter the following python code:

# prepare some form variables
PackageUrl=DocumentationPackage.LinkUrl
PackageName=DocumentationPackage.Name

# Assign the members of the reviewer group to auditor role
role=ProcessInstance.Roles.Create("Auditor")
role.ClearUsers()
reviewergroup=Workflow.Groups[DocumentationPackage.ReviewerGroup]
for user in reviewergroup.Users:
   role.Add(user)

In line 2+3 the script assigns the LinkUrl and Name attributes of the DocumentationPackage object to process instance attributes. This is required because we wish to provide these information in our form later. Ensure, that you at least Export the attributes out of your script into the global scope. To do this, select the attributes and choose Export.

NewItem831

In line 6 we create a new role Auditor or receive the role if it already exists. In line 7 we remove possible members from the role.

Line 8 gets an instance of the reviewer group. Line 9+10 adds all members of the reviewer group to the role.

Decline Activity

The Decline Activity is used to decline the documentation package.

NewItem812

Edit script task

The only step is to edit the script task. To do this, open the script task expression property. Switch the language to Python and enter the following python code:

# Delete documentation package
DocumentationPackage.Delete()

Release Activity

The Release Activity is used to release the documentation package.

NewItem813

Edit script task

The only step is to edit the script task. To do this, open the script task expression property. Switch the language to Python and enter the following python code:

# Release documentation package
DocumentationPackage.Release()

Decision Path 1

After the Auditor has completed the form, the process instance attribute "Released" contains either "0" for decline or "1" for release.

This must be mapped to the outgoing sequence flows of our decision gateway. Select the sequence flow which directs to the Decline Activity.

NewItem816

Enter Released==0 in the F(x) input field. Also indicate, that the attribute "Released" has to be imported from the global scope into our formula.

NewItem818

Decision Path 2

After the Auditor has completed the form, the process instance attribute "Released" contains either "0" for decline or "1" for release.

This must be mapped to the outgoing sequence flows of our decision gateway. Select the sequence flow which directs to the Release Activity.

NewItem819

Enter Released==1 in the F(x) input field. Also indicate, that the attribute "Released" has to be imported from the global scope into our formula.

NewItem820

Set Tag

Set the tag "Documentation Releaser" in the Workflow Build Options of the project.

Build Workflow

If you completed all steps you can now build the workflow. Information on how to build a workflow can be found here.
Set the workflow as the active version. You can either deploy a productive version and directly set it as the active version or you can set the active version through the menu option of the Run button.

If you now publish a business process documentation, the workflow is available and can be chosen to control the deployment process.