This section is organized as follows:

Icon
For a walk-through and configuration of this Workflow, we refer to Approval Process Walk Through.

BPMN Diagram

Step 1: Create a new Activiti project and/or Activiti diagram

The creation of a new Activiti project/diagram is explained in the section on Setting Up Your Workflow Design Workbench

Step 2: Change the Identifier, Name and Description of the Process

We refer to the section Designing Your First Workflow From Scratch, subsection "Change the Identifier, Name and Description of the Process" for an explanation on how  to change the identifier, name and description. For this case, name the workflow (e.g., the default would be "Approval Process") and give it an identifier (e.g., the default name would be "approvalProcess"). 

Step 3: Create a Pool and Lanes

We refer to the section Designing Your First Workflow From Scratch, subsection "Defining a Pool and Lanes" for an explanation on how to change the identifier, name and description. Start with all 4 needed lanes:

  1. Start User
  2. Subject Matter Expert
  3. Stakeholder
  4. Steward

Step 4: Create a Start and End Event

Set the properties (of the start event):

Start Event > Properties Tab > Form

Form Properties (Configuration Variables)

IdNameTypeDefaultRequiredReadableWriteable
smeUserExpressionUser expression for the "Subject Matter Expert" lane in the processstringrole(Subject Matter Expert)falsefalsetrue
stakeholderUserExpressionUser expression for the Stakeholder lane in the processstringrole(Stakeholder)falsefalsetrue
stewardUserExpressionUser expression for the Steward lane in the processstringrole(Steward)falsefalsetrue
voteWarningTimeDurationPlease enter time duration before a voting reminder is sendstringB5Dfalsefalsetrue
voteTimeoutDurationTimeout before voting process is forced to continuestringB7Dfalsefalsetrue
voteCompletionPercentagePercentage required to vote before completionlong100falsefalsetrue
reviewWarningTimeDurationTime duration before sending reminder in "Review Definion" taskstringB5Dfalsefalsetrue
reviewTimeoutDurationTime before review task is forced to continuestringB7Dfalsefalsetrue
reviewCompletionPercentagePercentage of users for "Review Definition" that need to complete their task before continuinglong100falsefalsetrue
commentTimeoutDurationime duration before the comment subprocess is endedstringB5Dfalsefalsetrue
sendVotingActionEmailsSend an action email to users that are required to vote in the processbooleanfalsetruefalsetrue
Icon
For more information about Start and End Events, go to: Designing Your First Workflow From Scratch > Create a Start / End Event

Step 5: Review Definition

Create a Call Activity that will call the Voting Sub-Process:

 

Icon
For the design of the Voting Sub-Process, go to: Voting Sub-Process Design and Implementation

Set the properties:

Service Call > Properties Tab > Main config

SettingValueDescription
Called ElementvotingSubProcess

This is the Id of the Voting Sub-Process that is being called

Input ParametersSee BelowThe variables or expressions that are being passed to the votingSubProcess
Output ParametersSee BelowThe output variable from the call activity

Input Parameters: These are expressions and variables that are passed to the Voting Sub-Process

SourceSource expressionTargetTarget expression
 ${'Please review the '}${item.getConceptTypeName()}${'.'}decisionInfo 
smeUserExpression voterUserExpression 
reviewCompletionPercentage votePercentage 
 ${true}addComments 
 ${true}earlyComplete 
reviewWarningTimeDuration voteWarningTimeDuration 
reviewTimeoutDuration voteTimeoutDuration 
 ${"Review"}voteButtonLabel 
 ${"Review"}voteTaskName 
activityFilter activityFilter 
sendVotingActionEmails sendActionEmail 

Output Parameters:

SourceSource expressionTargetTarget expressionDescription
votingResult votingResult This is the final result of the Voting Sub-Process. It will be true or false

Service Call > Properties Tab > Listeners

Execution Listeners

Listener implementationTypeEventFields
com.collibra.dgc.core.workflow.activiti.listener.SetActivityStreamListenerclassstartSee Below

Field nameString valueExpression
startOnStatusChangeFromAccepted 
resourceTypesAT 

 

Step 6: Rejected Definition

Create an exclusive gateway and a user task

Set the properties:

Sequence Flow (rejected) > Properties Tab > Main config

PropertyValueDescription
Label width39The width of the label on the flow
Condition${!votingResult.votingResult}This is the result variable from the Voting Subprocess. The "!" means that it is logically opposite, this means that if the "votingResult" variable is "false' then "!votingResult" is true. Therefore the workflow would take this path.

User Task > Properties Tab > Main config

PropertyValueDescription
Candidate usersuser(${startUser})This notification will go to the start user
DocumentationCorrect the definition after it was rejected by ${users.current}.The start user will see this description on the yellow task ribbon.

User Task > Properties Tab > Listeners

Listener implementationTypeEventFields
com.collibra.dgc.core.workflow.activiti.listener.SetActivityStreamListenerclassstartSee Below

Fields:

Field nameString valueExpression
resourceTypesCM 


Step 7: Mark as "Under Review"

Add a service task to change the status of the Asset that is being approved.

Set the properties:

Sequence Flow (accepted) > Properties Tab > Main config

PropertyValueDescription
Label width45The width of the label on the flow (accepted)
Condition${votingResult.votingResult}This is the result variable from the Voting Sub-Process.

Service Task > Properties Tab >Main config

PropertyValueDescription
TypeJava ClassUse Java Class for a delegate task
Service classcom.collibra.dgc.core.workflow.activiti.delegate.StateChangerThis is the StateChanger delegate class
FieldsSee BelowThese are the inputs for the delegate class

Fields:

Field nameString valueExpressionDescription
targetState00000000-0000-0000-0000-000000005020 This is the UUID of the new state of the asset.
Icon

This method can be found at: <yourCollibraDomain>/docs/index.html > core > Package: com.collibra.dgc.core.component.delegate > Interface: StateChanger

Step 8: Create Comment Event Sub-Process

Create an Event Sub-Process that gets a comment from each stakeholder:

Set the properties:

EventSubProcess > Properties Tab > Multi instance

PropertyValueDescription
SequentialNo 
Collection${users.getUserNamesWithError(stakeholderUserExpression)}This is the List that will be looped through
Element VariablecurrentStakeholderthis is the item in the list that will be looped through the event sub-process

Due to the Multi-Instance settings, this Event Sub-Process will run as many times as there are Stakeholders. It allows every Stakeholder to make a comment.

Icon

The getUserNamesWithError() method can be found at: <yourCollibraDomain>/docs/index.html > core > Package: com.collibra.dgc.core.component.bean > Interface: UsersBean

Timer Boundary Event > Properties Tab > Main Config

PropertyValueDescription
Cancel activitytrue 
Time duration${commentTimeoutDuration}See configuration variables in Start Event

This Event Sub-Process is complete after all the Stakeholders post a comment or until the timeout duration is reached.

Step 9: Provide Comment

Set the properties:

User Task > Properties Tab > Main Config

PropertyValueDescription
Candidate usersuser(${currentStakeholder})Created on the Event Sub-Process Multi instance settings above.
DocumentationPlease provide comments.The Stakeholder will see this description on the yellow task ribbon.

User Task > Properties Tab > Form

Form Properties:

IdNameTypeRequiredReadableWriteableDescription
commentCommenttextareatruetruetrueThe text area to post comment
commentButtonCommenttaskButtonfalsetruetrueThe submit button

Step 10: Store Comment

Set the properties:

 

Service Task > Properties Tab > Form

PropertyValueDescription
TypeExpression 
Expression${commentComponent.addComment(item.id, item.type, comment)}The expression to add a comment
Icon
The addComment method can be found at: <yourCollibraDomain>/docs/index.html > core >Package: com.collibra.dgc.core.model.comment> Interface: CommentComponent

Step 11: Process Comments

Create a user task that notifies the Subject Matter Expert to view the comments.

Set the properties:

User Task > Properties Tab > Main Config

PropertyValueDescription
Candidate users${smeUserExpression}See configuration variables
DocumentationPlease process the given comments.Additional text displayed on the yellow task ribbon

User Task > Properties Tab > Listeners

Task Listeners

Listener implementationTypeEventFields
com.collibra.dgc.core.workflow.activiti.listener.SetActivityStreamListenerclassstartSee Below

Fields:

Field nameString valueExpressionDescription
startTaskcomment_provide  
resourceTypesCM  

Step 12: Vote For Approval

Create a Call Activity that calls the Voting Sub-Process

Icon
For the design and implementation of the Voting Sub-Process, go to: Voting Sub-Process Design and Implementation

Service Call > Properties Tab > Main config

SettingValueDescription
Called ElementvotingSubProcess

This is the Id of the Voting Sub-Process that is being called

Input ParametersSee BelowThe variables or expressions that are being passed to the votingSubProcess
Output ParametersSee BelowThe output variable from the call activity

Input Parameters: These are expressions and variables that are passed to the Voting Sub-Process

SourceSource expressionTargetTarget expression
 ${"Please vote for the approval of the definition. If you want to reject, please provide a reason for doing so."}decisionInfo 
stewardUserExpression voterUserExpression 
voteCompletionPercentage votePercentage 
 ${true}addComments 
 ${true}earlyComplete 
voteWarningTimeDuration voteWarningTimeDuration 
voteTimeoutDuration voteTimeoutDuration 
 ${"Review/Reject"}voteButtonLabel 
 ${"Approve"}voteTaskName 
sendVotingActionEmails sendActionEmail 

Output Parameters:

SourceSource expressionTargetTarget expressionDescription
votingResult votingResult This is the final result of the Voting Sub-Process. It will be true or false

Step 13: Notify Stakeholders

Create a service task that sends out an email to the Stakeholders.

Set the properties:

Sequence Flow (rejected) > Properties Tab > Main config

PropertyValueDescription
Label width39The width of the label on the flow
Condition${!votingResult.votingResult}This is the result variable from the Voting Subprocess. The "!" means that it is logically opposite, this means that if the "votingResult" variable is "false' then "!votingResult" is true. Therefore the workflow would take this path.

Service Task > Properties Tab > Main config

SettingValueDescription
Service classcom.collibra.dgc.core.workflow.activiti.delegate.MailSenderMailSender Delegate class

Fields:

Field nameString valueExpressionDescription
templaterejected The input for the email template.
mailTo ${stakeholderUserExpression}The input for the email recipient. It will be the voter.

This Delegate Class can be found at: <yourCollibraDomain>/docs/index.html > core >Package: com.collibra.dgc.core.workflow.activiti.delegate > Interface: MailSender


Icon

For an explanation of using the MailSender Delegate, go to: Designing Your First Workflow From Scratch > Defining a service task that sends and email-notification


Step 14: Notify Start User

Create a service task that sends out an email to the Start User

Service Task > Properties Tab > Main config

SettingValueDescription
Service classcom.collibra.dgc.core.workflow.activiti.delegate.MailSenderMailSender Delegate class

Fields:

Field nameString valueExpressionDescription
templaterejected The input for the email template.
mailTo user(${startUser})The input for the email recipient. It will be the start user

 

Step 15: Mark as "Accepted"

Create a service task that will change the state of the Asset to Accepted.

Set the properties:

Sequence Flow (accepted) > Properties Tab > Main config

PropertyValueDescription
Label width45The width of the label on the flow
Condition${votingResult.votingResult}This is the result variable from the Voting Sub-Process.

Service Task > Properties Tab > Main Config

PropertyValueDescription
TypeJava ClassUse Java Class for a delegate task
Service classcom.collibra.dgc.core.workflow.activiti.delegate.StateChangerThis is the StateChanger delegate class
FieldsSee BelowThese are the inputs for the delegate class

Fields:

Field nameString valueExpressionDescription
targetState00000000-0000-0000-0000-000000005009 This is the UUID of the new state of the asset.

Step 16: Notify Stakeholders

Create a service task to notify the Stakeholders. Refer to the other "Notify Stakeholders" service task above.

Set the properties:

Service Task > Properties Tab > Main config

SettingValueDescription
Service classcom.collibra.dgc.core.workflow.activiti.delegate.MailSenderMailSender Delegate class

Fields:

Field nameString valueExpressionDescription
templateapproved The input for the email template.
mailTo ${stakeholderUserExpression}The input for the email recipient. It will be the start user

Step 17: Notify Start User

Create a service task to notify the Start User. Refer to the other "Notify Start User " service task above.

Set the properties:

Service Task > Properties Tab > Main config

SettingValueDescription
Service classcom.collibra.dgc.core.workflow.activiti.delegate.MailSenderMailSender Delegate class

Fields:

Field nameString valueExpressionDescription
templateapproved The input for the email template.
mailTo user(${startUser})The input for the email recipient. It will be the start user



Attachments:

image2014-4-18 12:19:40.png (image/png)
image2014-4-18 12:25:52.png (image/png)
image2014-4-18 12:29:50.png (image/png)
image2014-4-18 12:35:2.png (image/png)
image2014-4-18 13:5:0.png (image/png)
image2014-4-18 13:7:28.png (image/png)
image2014-4-18 13:19:14.png (image/png)
image2014-4-18 13:24:13.png (image/png)
image2014-4-18 13:30:31.png (image/png)
image2014-4-18 13:47:55.png (image/png)
image2014-4-18 13:49:6.png (image/png)
image2014-4-18 13:53:30.png (image/png)
image2014-4-18 13:57:4.png (image/png)
image2014-4-18 14:4:10.png (image/png)
image2014-4-18 14:7:15.png (image/png)
image2014-4-18 14:11:31.png (image/png)
image2014-4-18 14:21:12.png (image/png)
image2014-4-18 14:43:55.png (image/png)
image2014-4-18 14:52:5.png (image/png)
image2014-4-18 14:53:32.png (image/png)
image2014-4-18 14:56:30.png (image/png)
image2014-4-18 14:56:41.png (image/png)
image2014-4-18 14:56:49.png (image/png)
image2014-4-18 15:1:29.png (image/png)
image2014-4-18 15:4:35.png (image/png)
image2014-4-18 15:8:41.png (image/png)
image2014-4-18 15:9:33.png (image/png)
image2014-4-18 15:14:57.png (image/png)
image2014-4-18 15:19:57.png (image/png)
image2014-4-18 15:24:59.png (image/png)
image2014-4-18 15:27:44.png (image/png)
image2014-4-18 15:37:57.png (image/png)
image2014-4-18 15:40:0.png (image/png)
image2014-4-18 15:41:57.png (image/png)
image2014-4-18 15:44:10.png (image/png)
image2014-4-18 15:48:8.png (image/png)
image2014-4-18 15:51:7.png (image/png)
image2014-4-18 15:55:29.png (image/png)
image2014-4-18 15:57:29.png (image/png)
image2014-4-18 15:58:21.png (image/png)
image2014-4-18 16:34:19.png (image/png)
image2014-4-18 16:41:12.png (image/png)
image2014-4-18 16:45:52.png (image/png)
image2014-4-18 16:54:43.png (image/png)
image2014-5-2 16:6:37.png (image/png)
image2014-5-2 16:23:41.png (image/png)
image2014-5-2 16:25:39.png (image/png)