Introduction to Developing a Guided Business Process Configuring Activity Guide Properties

24-20 Modeling and Implementation Guide for Oracle Business Process Management

4. Click OK.

24.6.28 What Happens When You Configure the Display Mode for a Milestone

The milestone links are displayed according to this configuration, regardless of the Guided Business Process configuration.

24.6.29 How to Configure the Display Mode for a User Task

You can configure the display mode for a user task to specify how to display the task link. To configure the display mode for a user task: 1. In the BPM Project Navigator, select the Activity Guide node. 2. In the Structure window, expand the milestone that contains the user task. 3. Right-click the user task.

4. Select Edit.

5. From the Display Mode list, select an option from the following:

6. Click OK.

24.6.30 What Happens When You Configure the Display Mode for a User Task

The task links are displayed according to this configuration, regardless of the Guided Business Process configuration and the milestone configuration. The tasks links appear when the milestone is visible.

24.6.31 How to Configure the Task Access Mode for a Guided Business Process

You can configure the task access mode for a Guided Business Process to specify when to display the task links enabled. To configure the task access mode for a Guided Business Process: 1. In the BPM Project Navigator, right-click the Activity Guide node. 2. Select Edit. 3. In the Task Access list select an option from the following: Display Mode Description Default Use the milestone configuration. Always Always display the task link when the milestone that contains it is visible. If the user task is not instantiated, then the link is grayed out. When Instantiated Display tasks only when the user task is instantiated. Use this mode for user tasks located after a conditional gateway so that the activity guide tree does not display the user task until the BPM Service Engine evaluates the condition. Working with Guided Business Processes 24-21

4. Click OK.

24.6.32 What Happens When You Configure the Task Access Mode for a Guided Business Process

After the task is completed, the Guided Business Process uses this configuration to display the links. If the task mode is active only, the tasks links are grayed out. If the task mode is any state, the tasks links remain enabled and a message appears when you try to run the task.

24.6.33 How to Localize a BPMN Guided Business Process

You can localize a BPMN Guided Business Process so that the client can display it in different locales. To localize a BPMN Guided Business Process: 1. In the BPM Project Navigator, select the Activity Guide node. 2. In the Structure window, right-click the Activity Guide node. 3. Select Edit. 4. From the Title list, select Translation. 5. Click the Translation icon, next to the title field. The Edit Translatable Strings dialog appears.

6. Click Create Resource Bundle.

The Create Resource Bundle dialog appears. 7. Enter a name to identify the resource bundle.

8. Click OK.

The Edit Translatable Strings dialog shows the resource bundle you created.

9. Click the Add icon next to the key list to add a new translation key.

The Create a New Key dialog appears.

10. In the Name field, enter a name to identify the translation key.

11. In the Translatable Text field, enter the title.

12. Click OK.

13. From the Description list, select Translation.

14. Click the Translation icon, next to the description field.

The Edit Translatable Strings dialog appears.

15. Click the Add icon next to the key list to add a new translation key.

Task Access Mode Description Active Only The link to the task is enabled only when the task is active and the user can update it. When you complete the task the link to the task is grayed out. Any State The link to the task is always enabled after you instantiate the task, even after you complete the task. 24-22 Modeling and Implementation Guide for Oracle Business Process Management The Create a New Key dialog appears.

16. In the Name field, enter a name to identify the translation key.

17. In the Translatable Text field, enter the description.

18. Click OK.

19. In the Edit Activity Guide dialog, click OK.

20. Localize the milestones that compose the Guided Business Process.

24.6.34 How to Localize a Milestone

You can localize a milestone so that the client can display it in different locales. To localize a milestone: 1. In the BPM Project Navigator, select the Activity Guide node. 2. In the Structure window, right-click the Activity Guide node. 3. Select Edit. 4. From the Title list, select Translation. 5. Click the Translation icon, next to the title field. The Edit Translatable Strings dialog appears.

6. Click the Add icon next to the key list to add a new translation key.

The Create a New Key dialog appears.

7. In the Name field, enter a name to identify the translation key.

8. In the Translatable Text field, enter the title.

9. Click OK.

10. From the Description list, select Translation.

11. Click the Translation icon, next to the description field.

The Edit Translatable Strings dialog appears.

12. Click the Add icon next to the key list to add a new translation key.

The Create a New Key dialog appears.

13. In the Name field, enter a name to identify the translation key.

14. In the Translatable Text field, enter the description.

15. Click OK.

16. In the Edit Activity Guide dialog, click OK.

17. If the milestone contains user tasks configured to display blocked icon and text, localize the user tasks that compose the milestone.

24.6.35 How to Localize a User Task

In a user task you can localize the following elements: ■ Title ■ Description ■ Blocked Text Working with Guided Business Processes 24-23 This procedure shows you how to localize the blocked text. You can also localize the title and description of the user task following the standard procedure for localizing flow objects. To localize a user task: 1. In the BPM Project Navigator, select the Activity Guide node. 2. In the Structure window, expand the Activity Guide node. 3. If the milestone that contains the task you want to remove is collapsed, then expand the milestone. 4. Right-click the task.

5. Select Edit.

6. From the Display Block Icon and Text list, select translation.

7. Click the Translation icon, next to the title field.

The Edit Translatable Strings dialog appears.

8. Click the Add icon next to the key list to add a new translation key.

The Create a New Key dialog appears. 9. In the Name field, enter a name to identify the translation key. 10. In the Translatable Text field, enter the title.

11. Click OK.

24.6.36 What Happens When You Localize a Guided Business Process

The title and description of the Guided Business Process, milestones and tasks are displayed in the locale specified in the Guided Business Process client.

24.7 Configuring Activity Guide Properties

You can customize Activity Guides behavior by configuring their properties. To configure these properties you must edit the file activityguide.properties. Table 24–1 shows the properties you can specify in this file. Example 24–1 shows a typical activityguide.properties file: Table 24–1 Activity Guide Properties Property Description Possible Values ServerAuthenticationMethod Specifies the authentication mode used to connect to services deployed in the SOA Engine. IDENTITY_PROPAGATION ServerConnectionMode Specifies the mode for the transmission of data. ■ SOAP ■ REMOTE WorklistHttpURL Only required when using digital signatures. Specifies the URL to access the worklist application. http:host:portintegrationworklisapp SelectionFilter Specifies the filter used to filter the processes in an activity guide. ■ MY ■ PREVIOUS ■ REPORTEES ■ ADMIN 24-24 Modeling and Implementation Guide for Oracle Business Process Management Example 24–1 An activityguide.properties File ActivityGuide Properties ServerAuthenticationMethod=IDENTITY_PROPAGATION ServerConnectionMode=SOAP SelectionFilter=MY Realm=jazn.comShow RefreshButton=true ShowAllAGTreeNodesProperties=true Sample value for AGDefinitionFilter: defaultBPMAGPrj22.031fcd931-6263-4b58-97cf-6fb084addabc AGDefinitionFilter= AGInstanceID=110003 AGInstanceOrdering=CIKEY:DESC CustomPredicate1=STATE,EQ,OPEN CustomPredicate2=STATUS,EQ,In Progress Example Value for AGTasksPopupTaskflowID is WEB-INFag-popup-task-flow.xmlag-popup-task-flow AGTasksPopupTaskflowID= ShowCustomBlockedIcon=true HideAGTreeRootNode=false AGDefinitionFilter Specifies the definition ID used to filter the process in an activity guide. The activity guide only displays those processes that match this ID. activity guide definition ID AGInstanceOrdering Specifies the order used to display the processes in the activity guide. For example: CREATION_DATE:ASC ■ column_name:ASC ■ column_name:DESC Default value: ASC AGInstanceID Specifies the instance ID used to display the activity guide tree. For example: 10001 activity guide instance ID CustomPredicate1 Specifies an additional predicate to filter the list of processes in an activity guide. For example: CREATOR, EQ, jstein column name, operator, value CustomPredicate2 Specifies a different additional predicate to filter the list of processes in an activity guide. This predicate is used with CustomPredicate1 column name, operator, value ShowAllAGTreeNodesProperties Specifies if the activity guide shows a section at the top that describes the properties of activity guides, milestones and tasks. ■ true ■ false Default value: true ShowRefreshButton Specifies if the regional area displays a refresh button. ■ true ■ false Default value: false AGTasksPopupTaskFlowID Specifies the content to display in the task pop-up. fully qualified TaskFlow ID HideAGTreeRootNode Hides the Guided Business Process title on the Activity Guide Tree root node. ■ true ■ false Default value: false realm Security abstraction that controls access to the resources served by the Java Web Server. jazn.com ShowCustomBlockedIcon Specifies if the Guided Business Process shows the custom task blocked icon. ■ true ■ false Default value: false Table 24–1 Cont. Activity Guide Properties Property Description Possible Values Working with Guided Business Processes 24-25 WorklistHttpURL is required only for digital signatures WorklistHttpURL=http:host:portintegrationworklistapp

24.8 Deploying an Guided Business Process to Oracle Weblogic Server

Guided Business Process are deployed to the application server in the same way as an SOA composite process. However, Guided Business Processes must be deployed to a standalone instance of Oracle WebLogic Server rather than the embedded Oracle WebLogic Server included with JDeveloper.

24.8.1 How to Deploy a Guided Business Process

Deploying a Guided Business Process to Oracle WebLogic Server involves the following main steps: ■ Creating a connection to Oracle WebLogic Server ■ Using JDeveloper or an Ant script to deploy the Guided Business Process To deploy an Guided Business Process: Following are the main steps in deploying an Guided Business Process: 1. Create a connection to Oracle WebLogic Server.

a. Use connection type Weblogic 10.3.

b. Enter a name for the WLS Domain. 2. Deploy the Guided Business Process through JDeveloper or using an Ant script: To deploy a Guided Business Process using JDeveloper: ■ Right-click the SOA composite associated with the Guided Business Process and select Deploy, then select the name of the SOA composite and the name of the server connection configured in the previous step. To deploy a Guided Business Process using an Ant script: ■ Right-click the SOA composite and select Deploy, the name of the SOA composite and to JAR. ■ Run the command shown in Example 24–2 : Example 24–2 Deploying a Guided Business Process Using an Ant Script ant -f ORACLE_HOMEbinant-sca-deploy.xml -DsarLocation location of sca_ composite.jar -DserverURL soa server url - Duser administrator user name -Dpassword administrator password For more information about deploying an SOA composite to the application server, see Deploying SOA Applications with Enterprise Manager in Oracle Fusion Middleware Developers Guide for Oracle SOA Suite.

24.8.2 What Happens When You Deploy a Guided Business Process to Oracle WebLogic Server

The Guided Business Process runs on WLS. You can view the Guided Business Process using Oracle Enterprise Manager Application Server Control console. 24-26 Modeling and Implementation Guide for Oracle Business Process Management For more information about deploying SOA applications to WLS, see Deploying SOA Applications with Enterprise Manager in Oracle Fusion Middleware Developers Guide for Oracle SOA Suite.

24.9 Testing Guided Business Processes

You can create an instance of the deployed Guided Business Process in the Oracle Enterprise Manager Application Server Control console. This is useful for testing purposes. To create a Guided Business Process instance: 1. In a Web browser, enter the URL of the Oracle Enterprise Manager Fusion Middleware Control Console as follows: Example 24–3 Oracle Enterprise Manager Fusion Middleware Control Console URL http:hostname of Weblogic standalone server:portem 2. Browse for the application and click the SOA composite you created.

3. Select Actions Test service - client.

4. Test the Guided Business Process by entering sample data and invoking the composite. 5. Refresh Fusion Middleware Control Console and verify that the SOA composite instance has been created. Check that the business process completed.

24.9.1 What Happens When You Create a Guided Business Process Instance

After you create an instance in a Guided Business Process, the Guided Business Process state changes to ’In Progress’ and you can view the Activity Guide tree in the client application. 25 Building a Guided Business Process Client Application 25-1 25 Building a Guided Business Process Client Application This chapter explains how to build a client application to display your process instances using the milestones you defined when creating your Guided Business Process. This chapter includes the following sections: ■ Section 25.1, Introduction to Building a Guided Business Process Client Application ■ Section 25.2, Developing a Guided Business Process Client Application with Oracle ADF ■ Section 25.3, Securing the Guided Business Process Client Application ■ Section 25.4, Localizing a Guided Business Process Client Application ■ Section 25.5, Guided Business Process Run-time APIs ■ Section 25.6, Developing an Example of a User Interface for Guided Business Process Tasks Using Guided Business Process Run-Time Services ■ Section 25.7, Using Guided Business Process Logging

25.1 Introduction to Building a Guided Business Process Client Application

Guided Business Processes provide you with predefined ADF tasksflows that you can use to build an ADF application to display and run Guided Business Processes. If the provided ADF taskflows do not satisfy your requirements, then you can use the set of APIs that Guided Business Processes provide, to obtain the information that your UI client applications displays. These APIs allow you to obtain data about the milestones and tasks using web services and Enterprise Java Beans.

25.2 Developing a Guided Business Process Client Application with Oracle ADF

A Guided Business Process client application provides a user interface for the Guided Business Process task flow. The client application can be developed in a simple ADF JSPX page in any configuration. Typically, a client application includes a region displaying the Activity Guide tree and another region displaying the details of the specific node selected from the tree. 25-2 Modeling and Implementation Guide for Oracle Business Process Management One way to display these two regions is to include a dynamic region on the left side of a JSPX page and a human task flow on the right. However, any configuration is possible.

25.2.1 How to Develop a Guided Business Process Client Application

To develop a Guided Business Process client application: 1. In JDeveloper, create a new application.

2. Right-click the ViewController Project and then select Project Properties.

3. Select Libraries and Classpath.

4. Click Add JARDirectory.

A file browser dialog box opens.

5. Select the oracle.bpm.activityguide-ui.jar file located under JDEV_

HOMEjdevelopersoamodules .

6. Click Select.

7. Add the run-time shared library references oracle.soa.bpel. and

oracle.soa.workflow.wc to the weblogic-application.xml file by adding the following code: library-ref library-nameoracle.soa.bpellibrary-namelibrary-reflibrary-ref library-nameoracle.soa.workflow.wclibrary-name library-ref 8. Create a new JSF Page .jspx in which to display the Activity Guide. 9. Drag and drop the following task flows onto the JSF Page .jspx: ■ ag-tasktree-task-flow: for displaying the Activity Guide tree ■ ag-humantask-task-flow: for displaying the individual Activity Guide node

10. Create a file called activityguide.properties.

For more information on Activity Guide properties, see Section 24.7, Configuring Activity Guide Properties . If using identity propagation to secure the Activity Guide, then the properties WorkflowAdminUser and WorkflowAdminPassword are not required.

11. To enable a task flow popup with summary information, include the following

properties in the activityguide.properties file: AGTasksPopupTaskFlowID : Use this parameter to display a task flow summary in ADF dynamic regions. Enter the relevant task flow ID. If this parameter is not set then the popup shows the value of OutputText as the default task summary. If you provide an invalid task flow region ID, then the Guided Business Process does not render the region and logs a message in the server log. Note: Dragging and dropping a task flow automatically creates a region for that task flow. Building a Guided Business Process Client Application 25-3 12. Configure the Activity Guide to display a refresh button in the Activity Guide tree., using the following alternative methods: ■ In the file activityguide.properties, add the parameter ShowRefreshButton . Set its value to true to enable the display of a refresh button, and false or any other value to disable the refresh button. ■ In the Activity Guide tree task flow, add the parameter ShowRefreshButton and set its value to true. This task flow parameter overrides the value of the parameter set in the activityguide.properties file. If the value of the ShowRefreshButton parameter is empty or null, then the property ShowRefreshButton in the file activityguide.properties defines if the refresh button is shown. If the activityguide.properties file does not specify a value for this property then the refresh button is not shown in the client. Example 25–1 illustrates adding a ShowRefreshButton parameter to the tree task flow. Example 25–1 Add the ShowRefreshButton Parameter to the Tree Task Flow taskFlow id=dynamicRegion1 taskFlowId={backingBeanScope.dynamicLeft.dynamicTaskFlowId} xmlns=http:xmlns.oracle.comadfcontrollerbinding parameters parameter id=ShowRefreshButton value=true” xmlns=http:xmlns.oracle.comadfmuimodel parameters taskFlow 13. Edit the file adfc-config.xml to include the location of the activity.properties file. This should be the absolute path to the activityguide.properties file. An example adfc-config.xml is shown in Example 25–2 . Example 25–2 adfc-config.xml File with Reference to activityguide.properties File managed-bean id=__10 managed-bean-name id=__12agPropsmanaged-bean-name managed-bean-class id=__ 11oracle.bpel.activityguide.ui.beans.model.AGPropertiesmanaged-bean-class managed-bean-scope id=__9sessionmanaged-bean-scope managed-property id=__15 property-nameagPropsFilePathproperty-name property-classjava.lang.Stringproperty-class value id=__14-- relative path or absolute path should be given here--activityguide.propertiesvalue managed-property managed-bean 14. Create a Workflow Service client configuration file. An example is shown in Example 25–3 . Example 25–3 Workflow Services Client Configuration File ?xml version=1.0 encoding=UTF-8 standalone=yes? workflowServicesClientConfiguration xmlns=http:xmlns.oracle.combpelservicesclient server default=true name=default 25-4 Modeling and Implementation Guide for Oracle Business Process Management localClient participateInClientTransactionfalseparticipateInClientTransaction localClient remoteClient serverURLt3:host:portserverURL initialContextFactoryweblogic.jndi.WLInitialContextFactoryinitialContextFactory participateInClientTransactionfalseparticipateInClientTransaction remoteClient soapClient rootEndPointURLhttp:host:portrootEndPointURL identityPropagation mode=dynamic type=saml policy-references policy-reference enabled=true category=security uri=oraclewss10_saml_token_client_policy policy-references identityPropagation soapClient server

25.2.2 What Happens When You Develop a Guided Business Process Application with Oracle ADF

A JDeveloper application with an ADF Web project is created. The application includes the following: ■ JSF page with two regions, one for the Activity Guide tree and the other for Activity Guide node details. ■ An activityguide.properties file. 25.2.3 What Happens at Run Time: How a Guided Business Process Application Is Developed with Oracle ADF At run time, the Oracle ADF application displays the Guided Business Process developed at design time. A contextual event mechanism in the common ADF layer handles communication between the Activity Guide tree and Activity Guide node details, respectively. When you select a Guided Business Process instance, the Activity Guide tree displays the information for the Activity Guides, milestones, and tasks in that Guided Business Process instance. Alternatively, you can configure the AGInstanceID property in the activityguide.properties file for the JSF Page to render the following information for a particular Guided Business Process instance: ■ Activity Guide ■ Milestones ■ Tasks When selecting a milestone node in the Activity Guide tree, it retrieves or refreshes the sub-tree beneath the milestone. When selecting a task node in the Activity Guide tree, it displays detailed task information for the task. Building a Guided Business Process Client Application 25-5

25.3 Securing the Guided Business Process Client Application

Securing the Guided Business Process client application ensures that only users with proper credentials can complete the tasks outlined in the Guided Business Process. Security features include authentication, authorization, realm verification and policy enforcement.

25.4 Localizing a Guided Business Process Client Application

If you localize a Guided Business Process client application then you can run the client in all the supported languages you defined. If you want to localize a Guided Business Process application you must localize the following components when you design a Guided Business Process: ■ AG Title ■ AG Description ■ Milestone Title ■ Milestone Description ■ Task blocked explanation text The Guided Business Process automatically translates String that are part of the user interface, such as display title or Description. Guided Business Processes support the following locales: ■ French ■ German ■ Italian ■ Spanish ■ Brazilian ■ Japanese ■ Korean ■ Simplified Chinese ■ Traditional Chinese ■ Arabic ■ Czech ■ Danish ■ Dutch ■ Finnish ■ Greek ■ Hebrew ■ Hungarian ■ Norwegian ■ Polish ■ Portuguese 25-6 Modeling and Implementation Guide for Oracle Business Process Management ■ Romanian ■ Russian ■ Slovak ■ Swedish ■ Thai ■ Turkish See Section 25.4.1, How to Configure the Supported Locales for a Guided Business Process Client Application for more information on how to localize a Guided Business Process.

25.4.1 How to Configure the Supported Locales for a Guided Business Process Client Application

Before configuring a Guided Business Process application to support additional locales, ensure that you provided the required bundles for those locales when developing the Guided Business Process. To configure the supported locales for a Guided Business Process Client application: 1. Open the client application in Oracle JDeveloper. 2. Open the jspx client page.

3. Select Source View and modify the locale using the following code:

f:view locale= {view.locale} 4. Edit the faces-config.xml file located under Project_Root public_ htmlWEB-INF .

5. Click the Overview tab in the editor window.

6. In the editor window, select Application.

7. In the Locale Config area, click New to open the Property Inspector to add the

supported locales. 8. Add the supported locales. Example 25–4 shows how the faces-config.xml file looks after adding a set of supported locales. Example 25–4 faces-config.xml file locale-config default-localeendefault-locale supported-localearsupported-locale supported-localecasupported-locale supported-localecssupported-locale supported-localedasupported-locale supported-localedesupported-locale supported-localezh_CNsupported-locale locale-config 9. Set the browser locale to a supported locale. 10. Run the client page.