A user workflow event is one that is triggered by one of a number of user actions. This can be:
•a workflow button, which is a button designed to run a user workflow event
•a custom menu item designed to run a user workflow event
•a dynamic workflow page, which is an HTML page that can be created with a response to a User Workflow Event, can trigger a further User Workflow Event when a form on the page is submitted.
Event Properties
There are no properties you can set on the event beyond the standard properties that can be set on all events.
Properties Available for Child Actions To Use
The following properties are available for use in any child or descendant action:
Property |
Type |
Description |
---|---|---|
biskit |
Biskit of unknown type.
You will need to Type Cast the value to some Biskit Type to have access to the properties on the biskit. |
When viewing an individual biskit and a workflow button is pressed, biskit is the biskit that was being displayed.
When the User Workflow Event is triggered by other means (such as a menu) or from a workflow button associated with a list of biskits, then the value of the biskit property will be null. |
biskits |
List of Biskits of unknown type.
You will need to Type Cast the values to some Biskit Type to have access to the properties on the biskit. |
When viewing a list of biskits and a workflow button is pressed, biskits provides all those biskits that were displayed.
When the User Workflow Event is triggered by other means (such as a menu) or from a workflow button associated with an individual biskit, then the value of the biskits property will be null. |
buttonLabel |
String |
The label on the button that was pressed to trigger this event. |
menu |
Biskit of type Run Workflow Event Page Menu |
If this event was triggered by a menu, then this specifies the item the user pressed, including the label on the item. |
formContent |
Biskit
See table below for a definition of the properties on this biskit. |
If the event was triggered by a form within a dynamic workflow page, then the formContent property provides the information submitted in the form. |
response |
Biskit
See table below for a definition of the properties on this biskit |
This is a biskit that your workflow can modify to determine what happens next to the user's browser. This includes the ability to have the user download a file, display a dynamic workflow page, switch to another page or display a pop-up message. |
state |
String |
This is a string whose content is entirely defined by your workflows. When one User Workflow Event runs, and generates a dynamic workflow page which can trigger a secondary User Workflow Event, you may want to have access in the secondary event to information that was generated in the primary event.
To deal with that, the primary event's workflow would set the state property on the primary event's response biskit, and then the secondary event's state would contain the same value.
You decide on the format of the value to be whatever you need. |
userWaiting |
Boolean |
Indicates whether the user's browser is waiting for a response. If the user's browser is not waiting the a response, then the response property value is ignored by the browser. |
The formContent biskit contains the following properties:
Example Properties |
Type |
Notes |
---|---|---|
triggerID |
String |
The HTML id property of the button that submitted the form. |
triggerName |
String |
This is the name property of the button that submitted the form. |
state |
String |
A workflow-defined string that can be used to persist state across calls to the workflow. The form state is whatever value was set in the response we received from the previous call. |
one property for each of the form's named items. |
String |
When an HTML form is submitted, the browser provides property names and values as strings.
When this event is triggered by an HTML form in a dynamic workflow page, those form properties are presented as properties on the formContent biskit.
For example, if you have a "First Name" element in the pageContent, then the formContent biskit would have a property called "firstName" whose value is a string. If nothing is entered into the text box, the firstName property would be missing, and so fetching its value would return null. Note that checkboxes and radio buttons yield string values of "true" and "false". Use getAsString() to return a string value. |
The response biskit contains the following properties:
Properties |
Type |
Notes |
---|---|---|
buttons |
List of Biskit of type User Workflow Button |
A list of buttons that should be displayed, possibly along with message, where each button may trigger another workflow. |
downloadableFile |
Biskit of type Temporary File |
A file that should be downloaded to the user's browser. Only one file can be downloaded per user workflow event execution. |
message |
String |
A message to display to the user. This is only displayed if the user is waiting for a response from the workflow. |
messageType |
JavaEnum (drop down) of: •Error (HTML formatted) •Warning (HTML formatted) •Info message (HTML, auto-disappears) •Info Message (HTML, manually cancelled) •Info Message (Plain text, manually cancelled) |
The type of message to display. This is only used if there is a value for 'message'. |
nextPageToken |
String |
The page to switch to. This should be the part of the URL of the page that follows the '#'. For example, use 'about' to go to the 'About' page. |
nextUserWorkflowEvent |
Biskit of type User Workflow Event |
The user workflow event to be run when any form within the page content is submitted. |
pageContent |
String |
HTML to display for the next page.
If you set this, then it is the HTML content that you would like to be displayed to the user for the next page. This is known as a dynamic workflow page because it is a page whose content is completely defined by a workflow. You can use this to display a form which will cause a secondary User Workflow Event to be run when the form is submitted. |
state |
String |
A workflow-defined string that can be used to persist state across calls to the workflow. Whatever value you store in here will be presented back in any subsequent User Workflow Event triggered. |
Running A Workflow From A Menu
In order to run a Workflow from a Menu, first create a Workflow with a User Workflow Event. This event will be run when the Menu item is selected.
You can then modify the properties of the Event's response biskit, for example to have the user's browser downlload a file, display a dynamic workflow page, display any standard page, or to display a pop-up message, possibly with buttons that can trigger further User Workflow Events.
Once the Workflow has been created go to the Menu Editor and create a Menu Custom Page of type "Run User Workflow Event". Here you will specify the User Workflow Event the menu item will run and whether the user is waiting for the result.
To create Buttons for the response, use the Biskit Create Workflow Action and create a biskit of type User Workflow Button, do not save to the database, and set up the properties, these are:
Properties |
Type |
Notes |
---|---|---|
Await Outcome |
Boolean |
Will the user wait for the outcome of pressing this button. |
Button Label |
String |
The label on the button. |
Button Tooltip |
String |
Tooltip to be viewed if the button is hovered over. |
Enabled |
Boolean |
Is the button enabled. |
State |
String |
String property to allow passing of information from the original Workflow to the one to be run by this button. |
User Workflow Event |
Biskit of type User Workflow Event |
The Workflow Event to be run when the button is pressed. |
Then add the button to the response using add (List:Biskit:typeOf:list; list)add(List:Biskit:; list,Biskit:typeOf:list; item). They will appear in the order they have been added to the list.
Running A Workflow From A Button
In order to run a Workflow from a Button, first create a Workflow with a User Workflow Event. This event will be run when the Button item is pressed. The Event contains a response biskit (see above for details), into which some information may be put using Biskit Update Workflow Action.
Once the Workflow has been created in the Workflow Editor press the Create Workflow Button and fill in the button details:
Properties |
Notes |
---|---|
Button Label |
The label on the button. |
Button Tooltip |
Tooltip to be viewed if the button is hovered over. |
Target Biskit Type |
Which Biskit Type is the button going to be assigned to. |
Enabled |
Is the button enabled. |
Contexts to display button |
View Biskit: Whilst a biskit of the Biskit Type is being viewed. |
Update Biskit: Whilst a biskit of the Biskit Type is being edited. |
|
View Biskit List: When a list of Biskits is being edited. |
|
User Workflow Event |
The Workflow Event to be run when the button is pressed. |
Await Outcome |
Will the user wait for the outcome of pressing this button. |
Sort Order |
The order the button will be presented in |
Use Type Cast Workflow Action to convert biskit to be the appropriate type in order to see the properties. A response with buttons can be created in the same manner as when running a Workflow from a Menu (see above).