Creating a simple BPM Manual Process

Tweet about this on TwitterShare on Facebook0Share on LinkedIn26Share on Google+0

A Manual Process in Oracle BPM Suite 12c is a process that the user starts through a Human Task.
In this post we will create a BPM Process to add employees through a Human Task and generate a XML file through File Adapter.
Download the sample application: BpmHelloWorldApp.zip.

Create a new BPM Application, name it as BpmHelloWorldApp and click Finish.
Right-click the project name and choose New > BPMN 2.0 Process.
In the BPMN 2.0 Process Wizard, choose Manual Process, name it as AddEmployee and click Finish.

creating-a-simple-bpm-manual-process1

Our BPM application was created.
Before we start to model our process, we need to create a new user.
Start the WebLogic Server, go to Console and create the hrofficer user.

creating-a-simple-bpm-manual-process2

Create the Canonical Model.
Go back to JDeveloper, create a new file inside Schema folder and name it as Employee.xsd.
Copy the following code inside the file.

<?xml version= '1.0' encoding= 'UTF-8'?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://waslleysouza.com.br/ns/employee"
    elementFormDefault="qualified">
  <xsd:element name="EmployeeRequest">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="FirstName" type="xsd:string"/>
	<xsd:element name="LastName" type="xsd:string"/>
	<xsd:element name="HireDate" type="xsd:date"/>
	<xsd:element name="Email" type="xsd:string"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

creating-a-simple-bpm-manual-process3

In the Applications window, select the AddEmployee file.
In the Structure window, right-click the Process Data Objects and choose New.
Name the new Data Object as employee and choose browse in the Type field.
In the Browse Types window, click the Business Object button.
In the Create Business Object window, set the Name as Employee and Destination Module as Data.
Mark the “Based on External Schema” option and click the Schema Browser button.
In the Type Chooser window, expand the Employee.xsd file and choose EmployeeRequest.

creating-a-simple-bpm-manual-process4

Click OK.

creating-a-simple-bpm-manual-process5

Click the Yes button to create Data Module.

creating-a-simple-bpm-manual-process6

In the Browse Types window, choose Employee and click OK twice.

creating-a-simple-bpm-manual-process7

Open the Organization file.
Edit the “Role” role and change it name to HrOfficer.
In the Members section, click the browse button.
In the Identity Lookup window, choose your Application Server and click the Lookup button.
Select the hrofficer user and click the Select button to associate it to HrOfficer role.

creating-a-simple-bpm-manual-process8

Click the OK button to confirm the changes.

creating-a-simple-bpm-manual-process9

Create a Human Task to add employees.
Go to AddEmployee file and double-click the User Task component.
In the Basic tab, name it as AddEmployee.
In the Implementation tab, click the Add button near Human Task field to create a new Human Task, and name it as AddEmployeeHT.
Click the Add button near Parameters section to open the Browse Data Objects window.
Expand Process and Data Objects nodes and drag and drop the employee node inside Parameters section.
Mark the Editable option and click OK.

creating-a-simple-bpm-manual-process10

Click Data Associations link and navigate to Output tab, connect the employeeRequest and employee nodes and click OK twice.

creating-a-simple-bpm-manual-process11

Open the AddEmployeeHT.task file.
Click the Form button and choose Auto-Generate Task Form.
Name the project as AddEmployeeUI and click OK.

creating-a-simple-bpm-manual-process12

Now we have a Human Task to add employees!
Let’s add a File Adapter to save the employee’s information as an XML File.
Open the BpmProject file and add a File Adapter inside External Reference section.
Name it as SaveEmployee and click Next 3 times.

creating-a-simple-bpm-manual-process13

Choose Write File as Operation File and click Next.

creating-a-simple-bpm-manual-process14

Specify the Directory for Outgoing Files and File Naming Convention, and click Next.

creating-a-simple-bpm-manual-process15

Click the Browse for schema file button, choose the EmployeeRequest node and click Next.

creating-a-simple-bpm-manual-process16

Click Finish.
In the AddEmployee file, add a Service Activity between AddEmployee and End Activities.
In the Basic tab, name it as SaveEmployee.
In the Implementation tab, choose Service Call as Type and SaveEmployee as Service.
Click Data Associations link, connect the employee and employyRequest nodes and click OK.

creating-a-simple-bpm-manual-process17

Click OK again.

creating-a-simple-bpm-manual-process18

Done!
To deploy your BPM Project, right-click the project name and choose Deploy > BpmProject.
Don’t forget to check all TaskFlow Projects.

creating-a-simple-bpm-manual-process19

Click Deploy.

creating-a-simple-bpm-manual-process20

If your application was deployed successfully, go to Business Process Workspace (http://<HOST>:<PORT>/bpm/workspace).
Log in as hrofficer user and add a new employee.

creating-a-simple-bpm-manual-process21

Go to Directory for Outgoing File you specified and open the XML file created.

creating-a-simple-bpm-manual-process22

Tweet about this on TwitterShare on Facebook0Share on LinkedIn26Share on Google+0

Author: Waslley Souza

Consultor Oracle com foco em tecnologias Oracle Fusion Middleware e SOA. Certificado Oracle WebCenter Portal, Oracle ADF e Java.

2 thoughts on “Creating a simple BPM Manual Process”

  1. I think you’ve forgotten to mention that you need to add the user hrofficer to the role HrOfficer in bpm workspace as a user with administrative privilege. I’m using the SOA Suite and BPM version 12.2.1.2.0, I don’t know if in an older version this task is done automaticaly.

Leave a Reply

Your email address will not be published. Required fields are marked *