B010 – Create a business workflow

What you will learn ?

How to create a wizard (set of screens) to assist the user.

STEP 1: Business process list

To list all business processes, go to Business Process / Business process

STEP 2: Create a business process

Step to create a business process “Screen workflow”

  • Name: unique name
  • Code: internal code
  • Type: Screen workflow
  • Class: any java class which modify default behaviour
  • Script: java script which modify default behaviour
  • Module: application module
    When the process is created 2 activities are generated: Start and End.
    If these two activities did not exist or were removed, they must be created manually.
  • Save without exit.
    NB: The other fields are only for long processes.


Create a business process

  • Name = AppCreateCustomer
  • Code = APPCC
  • Type = Screen workflow
  • Module = MyModule
  • Save

STEP 3: Process permission

Go to Permission process tab to add rights to the process:

  • Read only: ability to view activities
  • Instantiation: possibility to start the process
  • Cancel process: possibility to stop the process


For the AppCreateCustomer

  • Add all rights to MyAdminGroup group
    Create a ModelProcess diagram:
  • Insert Start and End activities to your model

STEP 4: Put a process in a domain

Put in the Main Menu tab and add the process to a domain.


Put the AppCreateCustomer process in the MyDomain Domain in position 200.

STEP 5: Translate the business process

Add a translation to a business process.


  • Translate the AppCreateCustomer process

STEP 6: Create activities

An activity wizard exists to create activities:

  • By Create activity button on the business process form
  • Either by right-clicking on the model diagram


use this wizard to create 3 activities (described below):

  • Create a customer
  • Select interests
  • Customer Score calculation

STEP 7: Activity Create customer

To create an activity, enter the following information:

  • A step code: usually prefixed by the code process
  • A name: a label that describes the activity for the modeller
  • 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).


Create an activity to create a customer:

  • Process = AppCreateCustomer
  • 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.


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


  • 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.


  • 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


  • 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


Add an activity to AppCreateCustomer process:

  • 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


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


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

  • 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


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)


  • 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.


  • 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
  • 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


  • 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


  • 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).

General concepts

Duis egestas aliquet aliquet. Maecenas erat eros, fringilla et leo eget, viverra pretium nulla. Quisque sed augue tincidunt, posuere dui tempor.


Duis egestas aliquet aliquet. Maecenas erat eros, fringilla et leo eget, viverra pretium nulla. Quisque sed augue tincidunt, posuere dui tempor.