Welcome to the fourth and final stop on the Vendor Renewal learning line. The renewal process is now in place, along automatic scheduling. At this skill station, we will use conditional actions to update the appropriate field in the Vendor record with the new expiration date supplied by the reviewer.
Learning Concepts at This Station:
Unlock the Published Version of the Stream
About Conditional Actions
Conditionally Execute an Action
Re-Lock the Stream
Unlock the Published Version of the Stream
- Go the the Vendor Renewal stream.
- Click the Stream Definition tab.
Above the components list, notice that you have two options: "Unlock", and "Create New Version". - Click Unlock.
- When the system asks for comments, you can leave the field blank.
(They're not required when locking -- only when locking. - At the bottom of the comment dialog, click Unlock.
Of course, you could also have chosen to create an new version of the stream to work on while the old version remained in use. But here you are making a small change that will augment the stream -- finishing it actually, so it works the way it should. (In other words, this version isn't really usable! We got away with publishing it, though, because there were no production Vendor records that were about to expire.)
Since won't be materially changing the stream in any fundamental way, and since it won't take long to make the change, unlocking the stream is a good choice in this instance.
About Conditional Actions
Conditional-action steps are another way that Pulpstream helps to keep your process-flow diagrams simple.
Instead of having to set up process flows for every little thing, you can use a conditional action step to get things down, without interrupting the flow of process.
That way, branches in the process flow diagram reflect real inflection points where the process steps actually differ, for different situations.
Conditionally Execute an Action
Start by getting the process ready for the change:
- At the bottom of the process diagram, click the "Approve" arrow, so it is highlighted.
- Dots appear at the top and bottom of the arrow, and square appears in the middle.
- You could drag the middle of the arrow or one of the endpoints to re-route the arrow, but here we just want to remove it.
- Press the Delete key to remove the arrow.
- Move the End step to the right to make room for a new step.
- From the Smart Steps dropdown, drag Execute Actions Conditionally onto the canvas.
- Put the new step directly below the Decision gateway, with the End step to the side.
- When you drop the step into the canvas, the conditional-actions form appears.
Give it a name:- Title - Update Expiry Date
- For the first condition, under Conditional Execution 1, test for a Safety certificate:
- Condition - Match All
- "Always" is the default. Changing it gives us the opportunity to specify the conditions under which the action will occur.
- There are other options as well. Take a moment to examine them.
- Field - Certificate Type
- Operator - Equal to
- Value - Safety (choose from the dropdown list)
- Condition - Match All
- Next, specify the action to take for that condition:
- Actions - Update Fields
- Note that many actions are possible.
Take a moment to scan the list.
- Note that many actions are possible.
- Field - Vendor
- All of the choices for a field to update are in the stream object.
- But one of the fields points to a Vendor record.
- That is the record we want to update.
Making that choice makes an additional field selector appear,.
Use it to choose a field in the Vendor record:- (field #2) - Safety Certificate Expiry
- Map Type - Field
- We are going to transfer the contents of one field to another.
- Value/Expression - Certificate Expiry Date
- Here, you are choosing the expiration-date field from the stream record.
- Here, you are choosing the expiration-date field from the stream record.
- Actions - Update Fields
We are now ready to set up the conditional action for an environmental certificate:
- Under the Title field, click Add another conditional execution.
- Fill in the fields for Conditional Execution 2:
- Condition - Match All
- Field - Certificate Type
- Operator - Equal to
- Value - Environmental
- Actions - Update Fields
- Field (1) - Vendor
- Field (2) - Environmental Compliance Certificate Expiry
- Map Type - Field
- Value/Expression - Certificate Expiry Date
- At the top of the dialog, click Save Changes.
The step appears in the process diagram. - Connect the Decision matrix to the new step.
- In the Connector dialog:
- When result is - Approve
- Click Save Changes.
- Connect the new step to the End step.
The process is now complete! - Above the components list, click Save Changes.
The modified process is now stored on the server.
Re-Lock the Stream
While the process was unlocked, it was still available for use. (Something we got away with, since it wasn't actually complete, at the time.) But now, we will re-lock it, so the newly-modified stream will be used whenever a new record is created:
- Above the stream components list, click Lock Again.
- In the dialog that opens, supply a comment (now required): Finished the process.
- At the bottom of the dialog, click Lock.
Since the stream is now locked, it will not be possible to make changes to it -- either accidentally or intentionally -- until it is explicitly unlocked, or until a new version is created.
Learn More
At this skill station, you worked with conditional process actions, and you practiced unlocking and re-locking a stream.
See Conditional Actions in the help system to learn more about setting up conditional behaviors without having to include them in the process diagram.
To learn more about locking and versioning of streams, see Checkout, Checking, Locking, Publishing, Versions in the help system.
Take the Next Step
Congratulations! You have now created an automated renewal process! From here, you can continuing exploring other tutorials in the Vendor Relationship Management series, or examine one of the other PurpleExpress primers.