0% found this document useful (0 votes)
24 views19 pages

Chapter 5 - Workflows

Uploaded by

proyectosvendom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views19 pages

Chapter 5 - Workflows

Uploaded by

proyectosvendom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Workflows

A workflow is a collection of activities which Pulse executes in a defined


sequence. The workflow is triggered by an action (mouse click, data value which
passes a defined threshold, etc.) which is attached to an element or object.

The Workflow Manager window displays a tree from which you can add workflows
and edit their properties (actions, order). You assemble and edit the workflows in
the Pulse Workflow Editor.

1 Pulse User Guide


Exercise 1 – Create a Workflow that Starts a Process

In this exercise, you will create a workflow that will start a mixing process on the
Production floor. The workflow will send commands to perform tasks in the logic
specified below. Then, you will create a Pulse Button Instrument that executes
the workflow.

1 Open 1sv1

2 Wait for 2 seconds

3 If tank1 level <50 then

4 tempValue=parameter 1 value

5 If tank1 level >=50 then

6 tempValue=parameter 2 value

7 Cv1= tempValue

8 Cv2= tempValue

9 Cv3= tempValue

10 Wait for 2 seconds

11 Start tank1 mixer

12 Wait for 2 seconds

13 Open a message box "the process started"

Perform the following procedure to create this workflow.

1 From the Developer Workstation’s Manage ribbon, click Workflows.

2 The Workflows Manager window opens. The Workflow Manager window


displays a tree from which you can add workflows and edit their properties
(activities, order).

2 Pulse User Guide


3 In the Workflow Manager Window, right-click and click New Workflow. The
Pulse Workflow Editor opens.

3 Pulse User Guide


4 Drag activities into the workflow chart and edit them according to the table
below

Activity Type Activity Parameters


Name

GetAdvisedItem Tank1_Level AdvisedItem - |!1:1:40001

Set Valve_1Sv1 AdvisedItem - |!1:1:1

Value - 1

Delay Delay1 TimeDuration - 00:00:02

Enabled - True

4 Pulse User Guide


5 Insert an IfElse activity and click on the first (left) activity branch.

6 Change the activity name to LestThen50 and Condition to Declarative Rule


Condition.

7 Click the + sign to expand the condition field.

5 Pulse User Guide


8 In the ConditionName field, type LessThen50 and click the … button in order
to enter the "IF" condition.

9 Click Edit and type the condition below that means that the "IF" condition is
true if the TankLevel Variable value is less then 50

int.Parse(((Afcon.Pcim.Client.Workflow.Actions.GetAdvisedItem)t
his.GetActivityByName("Tank1_Level")).Value) < 50

6 Pulse User Guide


10 Insert a Set activity for the IF branch according to step 3 in the Workflow
logic - If tank1 level <50, then tempValue=parameter 1 value. If the tanks
level is below 50, then set a temporary variable "tempVal" with a parameter's
value that we will define later in this exercise.

Edit the following fields

Name setOutputLowVal

AdvisedItem OWS|PCIM!tempVal

11 Double-click the Bind Property icon to connect the value field to the
workflow's Parameter1 field.

12 Choose Parameter1 and click OK.

7 Pulse User Guide


13 Select the right (ELSE) branch and change the activity name to
MoreThan50.

14 Insert a Set activity for the ELSE branch according to step 3 in the Workflow
logic - If tank1 level >=50, then tempValue=parameter 2 value. If the tanks
level is above 50, then set a temporary variable "tempVal" with a parameter's
value that we will define later in this exercise.

Edit the following fields

Name setOutputHighVal

AdvisedItem OWS|PCIM!tempVal

15 Double-click the Bind Property icon to connect the value field to the
workflow's Parameter2 field.

8 Pulse User Guide


16 Insert the items below according to the following logic

Activity Type Activity Parameters


Name

Set CV1 AdvisedItem - |!1:1:40020

Value - ?getvalue(ows|pcim!tempVal)?

9 Pulse User Guide


Set CV2 AdvisedItem - |!1:1:40021

Value - ?getvalue(ows|pcim!tempVal)?

Set CV3 AdvisedItem - |!1:1:40022

Value - ?getvalue(ows|pcim!tempVal)?

Delay Delay2 TimeDuration - 00:00:02

Set StartMixing AdvisedItem - |!1:1:3

Value – 1

Delay Delay3 TimeDuration - 00:00:02

Alert Alert1 "The Process Started"

17 Save the workflow as StartProcess.

Executing the Workflow

Use one of the following procedures to execute the workflow.

1 Open the Project Navigator pane to 1 In the Home ribbon, click Execute.
the Workflows mode. The Execute Workflow dialog box
opens.
2 Right-click the specific workflow
and click Execute Workflow. 2 Expand the Workflows folder,
select the workflow, and click
Execute.

3 In the Home ribbon, click Execute.


The Execute Workflow dialog box
opens.

-or-

Double-click the specific workflow.

3 Open the Project Navigator pane to

10 Pulse User Guide


the Workflows mode.

4 Right-click the specific workflow


and click Execute Workflow.

-or-

Double-click the specific workflow.

4 Expand the Workflows folder,


select the workflow, and click
Execute.

5 When you choose to execute the "StartProcess" workflow, the Workflow


Parameter dialog box opens.

Parameter 1 80

Parameter 2 30

11 Pulse User Guide


6 Click Execute.

7 Change the tank level value below and above 50 and notice how the workflow
reacts, according to the defined logic.

Adding an Execute Workflow Button to the Display

Add a Pulse Button instrument, which will execute the workflow, to the
production display.

12 Pulse User Guide


1 From the Insert ribbon’s Instruments group, click the Pulse Button icon
and then drag an area on the display to place the Button object.

2 Double-click the Button to open its Settings.

3 In the General tab, define the button's text.

Text Start

4 In the Actions Workflow tab, define the command to execute when the user
pushes the mouse button up. Click the … button to open the Actions Selector
and select the Workflows option. Choose the StartProcess workflow, type
the Parameter1 and Parameter 2 values and click OK.

13 Pulse User Guide


5 Click OK and save the display.

14 Pulse User Guide


Exercise 2 – Create a Workflow that Stops a Process

In this exercise, you will create a workflow that will stop the mixing process that
was started by the previous workflow. This workflow will send commands to
perform tasks in the logic specified below. Then, you will create a Pulse Button
Instrument that executes the workflow.

1 Close sv1

2 Close Cv1

3 Close Cv2

4 Close Cv3

5 Stop Mixer

Perform the following procedure to create this workflow.

1 From the Developer Workstation’s Manage ribbon, click Workflows.

2 In the Workflow Manager Window, right-click and click New Workflow. The
Pulse Workflow Editor opens.

15 Pulse User Guide


3 Drag activities into the workflow chart and edit them according to the table
below

Activity Type Activity Parameters


Name

Set Close_1Sv1 AdvisedItem - |!1:1:1

Value - 0

Set Close_Cv1 AdvisedItem - |!1:1:40020

Value – 0

Set Close_Cv2 AdvisedItem - |!1:1:40021

Value – 0

Set Close_Cv3 AdvisedItem - |!1:1:40022

Value – 0

16 Pulse User Guide


Set StopMixing AdvisedItem - |!1:1:3

Value - 0

4 Save the workflow as StopProcess.

5 Check how the workflow executes in the Operator Workstation.

Adding a Stop Workflow Button to the Display

Add a Pulse Button instrument, which will stop the workflow, to the production
display.

17 Pulse User Guide


1 From the Insert ribbon’s Instruments group, click the Pulse Button icon
and then drag an area on the display to place the Button object.

2 Double-click the Button to open its Settings.

3 In the General tab, define the button's text.

Text Stop

4 In the Actions Workflow tab, define the command to execute when the user
pushes the mouse button up. Click the … button to open the Actions Selector
and select the Workflows option. Choose the StopProcess workflow and click
OK.

18 Pulse User Guide


5 Click OK and save the display.

19 Pulse User Guide

You might also like