STEP 7: Activity Create customer

One type of activity: New, Update, Delete, Search, Select single, Service call or a specific page

Reversibility: to block or not a step backwards in the process

User dialogue: yes/no if it is set to no, invoke methods of the process

A module Other time related properties are used to alert if the activity is longer (/shorter).

Exercise:

Create an activity to create a customer:

Process = AppCreateCustomer

Step = APPCC-CLIENT

Name = CustomerEntry

Type = New

Reversible = Update without forward impact

User dialog = Yes

Module = MyModule

Click on Next

STEP 8: Translate activity

This step is to give a label in each language installed and a short help to the activity.

Exercise:

Translate the customer’s creative activity in French by:

Translation = Create customer

Abstract = Entering customer information

Click on Next

STEP 9: Grant activity to workflow group

This step will define the access rights to the activity:

Read only

Write permission: In a wizard, this means to enter and click Next to confirm the activity

Cancel permission: In a wizard, this means click Skip without validation

Exercise:

Give right to the MyAdminGroup group.
Caution: the groups listed in this step are those of type Workflow permission.

Do not allow the activity to cancel, because the user should not be able to Skip this step

Then click Create activity on the process.

Click on Next

STEP 10: Create transitions

This step allows you to create all possible transitions to and from the activity.

Exercise:

Choose a transition between the Begin activity and CustomerEntry activity

Do not connect it to the end of business because there will be other activities to insert

Click on Next

STEP 11: Activity data

This last step of the wizard allows you to define properties for this activity:

Those who are checked will be kept, others are optional and will be removed

If you do not use the wizard, click on build activities button to generate optional et mandatory activity data.

Exercise:

Check and enter the line: Object | Name | AppClient

Other data will not be used and can stay unchecked NB: a _New type activity, update, search … still needs to know which object you are working on

Object.Name: name of business object For information, other parameters are:

Next.Step: the following activity name to force the routing

Return.Code: return value of the activity in case of routing between different transitions.

Field : value of the object field

Activity data are accessible by code or syntax [Etape.Groupe.Data] example: [APPCC-CLIENT.Field.cliNom] will contain the customer’s name that has been enter after validation of the activity

STEP 12: Add an activity to select interests

Exercise:

Add an activity to AppCreateCustomer process:

Code = APPCC-INTEREST

Name = Interests

Type = Select multiple

Irreversible

User dialog = Yes

Module = MyModule

Then the translation:

Translation Interests

Abstract = Select Customer interests

Then the authorizations :

to MyAdminGroup

For Read only + Write and Cancel permission: i.e. we can skip this step

Then transitions:

Enter from CustomerEntry to Interest

STEP 13: Activity data

Exercise:

The objective of the activity is to allow selection in the list of interests:

Check and fill the line = Object | Name | AppInteret

Check and fill the line = Constraint | Mandatory | false. If we want to force the user to select at least one value must be “true”

Explanation of others data :

Field.row_id: contain the list of row_id that have been selected by the user.

Filter.. This allows you to filter the displayed selection list, for example to show interest with a score above ten: Filter.intScore > 10

Search.Spec: Allows to add a SQL filter to the list, for example the interest list score above ten and starting with “a”: t.int_score> 10 and t.int_libelle like ‘a%’

STEP 14: Add a Service call activity

Exercise:

Add an activity that will trigger the action of calculating the customer score:

APPCC-SCORE Code

Name = CustomerScore

Type = Service call

Irreversible

Operative = No

Module = MyModule

then

Translation = Score calculation

Rights = Read only + Write/ Cancel permission to MyAdminGroup

Transition = Interests to CustomerScore

STEP 15

A service call activity has 2 specific data:

Service.Mode = Synch or Asynch

Service.Name = name of the service to call (java method of the process)

Exercise:

Check and fill the line = Service | Mode | Synch

Check and fill the line = Service | Name | evalScore

STEP 16: use the diagram

It is possible to add links between activities from the process diagram.

Exercise:

Open the AppCreateCustomer process diagram

Insert all its activities if it is not already done (save the diagram)

Put the cursor in BPMTransition link mode (chain-like icon)

Draw an arrow between the activities CustomerScore and End

A Activity link form opens

STEP 17: Activity link

An activity link is made of different properties:

Process

From Step : source activity

To Step : target activity

Optional name

Action: you can add an action button on the activity by combining a transition to Action

Condition optional if there is only one way to get out of the original activity. Required to perform routing between multiple paths, the value of the condition must be equal to the given “Return.Code” of the source activity, the [DEFAULT] can be used to define a default path if no other conditions are valid.

Callback method : callback during the transition (java script method in the process)

Alert name : to add an alert (a server trace or email a user) on transition

Module

Exercise:

Create the transition from the CustomerScore to the End activity.

Create an email alert and associate it to the transition

STEP 18: Clear cache

Clear cache and test the process

STEP 19: Execute the process

Exercise:

Open the Sales menu

Click on the wizard Create customer

Check for the translation activity and abstract

Enter the client and click Next

Check that the filters work (score> 10)

Select the customer interests

Click on Next

Check if the selection is required or not according to your setting (Constraint.Mandatory)

The last activity should not be displayed because it is not a user activity (score calculation).