Recipes

A worker template specifies how to create a single worker. We now need to attach an instruction to create the worker to a group profile. To do this, we create an instance of the Start Process Recipe. Use of the recipe, and attaching it to a group profile, is described in Configuring PMX. In this section, we'll look at the recipe in more detail.

To create a recipe, create a node of type metrici.products.pmx.library.StartProcessRecipeType (which should be available as Start Process Recipe from the New menu on the library).

The Start Process Recipe has many configuration options.

Editing a start process menu

Name

The name that will appear on the group menu.

Reference

A reference for this component. It has to be unique across all components used in the instance of PMX.

User role

What sort of users should be offered the menu item. This control who can start the process – the status rules in the process control who can do what once the process has been started. Can be set to:

  • User – any user with rights to the group can start the process

  • Administrator – only administrator users can start the process.

  • Control – only administrator users can start the process, and only when viewing the group in the Settings|Groups option. Use this for little-used options that should only be done by administrators and should not even be offered to administrators from the normal screens.

  • None – nobody should be offered this. Use this for recipes that are used to start processes automatically.

Worker templates

Links to one or more worker templates (the Hello World Template) in our example. If you have more than one template, the user will be able to choose which to use.

Duplicate rule

Set to disallow duplicates to only permit one instance of the worker with the same connections. For example, if you were performing a survey of suppliers and you set this, then you could only send the survey to each supplier once.

Connection list lookup

A connection list is a component that can be associated with a group which returns a selected list of connections. It can be used to pre-set the possible connection or connections to use in a group, for example to only allow a process to be sent to one of a pre-defined list of organisation working on a project.

Multiple recipients

If checked, and if appropriate, allows the user to start processes for each of a group of connections, for example to send a survey to multiple suppliers. If not checked, the user will only be able to pick a single recipient.

For multiple recipients to work, all the roles to the worker must resolve such that exacly one of them has multiple recipients, and any others have exactly one recipient (so they can be resolved automatically). If this does not apply, only single selection is permitted.

Form

When a new process is started, the user is shown a form in which to enter the process name. This form can be replaced with a different form, which can contain additional fields for initialising the process. Fields from the form can be referenced in the process using the format %{data:init.data.field}, where field is the reference of the field from the form.

Name field

If a form is specified, the name of the field on the form that holds the name of the process. Defaults to "name".

Export form definition

If checked, then instead of the form data being written to the "data" property of the init data, the whole form definition will be written to the "form" property of the init data. Data on the form can still be accessed using the format %{data:init.form.data.field}.

Once you have defined the recipe, you can link it to the group profile. In this example, linking the Hello world to the Project Group Profile we created earlier lets us start instances of this process.

Hello world menu that uses a manually-created process definition and status rules