1.3 iProcess Conductor and iProcess Engine Implementation Order sent by BE is received by IPC through BW layer. IPC then becomes the orchestrator for that order. It will start a case of the Fulfillment procedure to accomplish the goals for that order. Later it will build an Execution Plan based on the Plan Fragments and then processing of the order will proceed based on that plan. Plan Fragments (Execution Plan template) consists of process component which are created in IPC. These process components are associated with iProcess subprocedures. In IAL Execution Plan is created by using AOPD (Automatic order plan development) feature of IPC. AOPD as its name suggests facilitate runtime generation of execution plan. Below are the tasks performed by iPC during complete lifecycle of an order. IPC order reception (OrderRequest). IPC stores automatically the order in the database. IPC creates a case of fulfillment procedure in IPE for the order received (the main procedure). IPE requests the execution or fulfillment plan to BE (via BW) sending the Order ID. IPC receives the fulfillment plan (AOPDRequest), stores it automatically in the database and sends a response (AOPDResponse) which contains the Unique Plan ID. BW receives the AOPDResponse message, extracts the Unique Plan ID and sends it to IPE in order IPE tells to IPC to associate the execution plan to its IPC Order and start the plan. IPC starts the Execution Plan. There will be executed all tasks in the plan. Each task represent a Fenix or Tibco event.
41
Embed
iProcess Conductor and iProcess Engine Implementation
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1.3 iProcess Conductor and iProcess Engine Implementation
Order sent by BE is received by IPC through BW layer. IPC then becomes the orchestrator for that order.
It will start a case of the Fulfillment procedure to accomplish the goals for that order. Later it will build an
Execution Plan based on the Plan Fragments and then processing of the order will proceed based on that
plan. Plan Fragments (Execution Plan template) consists of process component which are created in IPC.
These process components are associated with iProcess subprocedures. In IAL Execution Plan is
created by using AOPD (Automatic order plan development) feature of IPC. AOPD as its name suggests
facilitate runtime generation of execution plan.
Below are the tasks performed by iPC during complete lifecycle of an order.
IPC order reception (OrderRequest).
IPC stores automatically the order in the database.
IPC creates a case of fulfillment procedure in IPE for the order received (the main procedure).
IPE requests the execution or fulfillment plan to BE (via BW) sending the Order ID.
IPC receives the fulfillment plan (AOPDRequest), stores it automatically in the database and
sends a response (AOPDResponse) which contains the Unique Plan ID.
BW receives the AOPDResponse message, extracts the Unique Plan ID and sends it to IPE in
order IPE tells to IPC to associate the execution plan to its IPC Order and start the plan.
IPC starts the Execution Plan. There will be executed all tasks in the plan. Each task represent a
Fenix or Tibco event.
1.3.1 iPC Implmentation
1.3.1.1 Order Reception
Order Schema and description
Order sent by BE to iPC should be based on the order schema defined in IPC for Order reception. This
order is sent on a TIBCO EMS queue, “queue/ COMOrderRequestInjectorQueue”, preconfigured in
iPC from order reception. Please refer section 1.2.11 for the mapping of iPC order with Siebel order
message.
BE BW iPC iPE
OrderRequestOrderRequest
OrderIdOrderId
AOPDRequest AOPDRequest
AOPDResponse
Unique Plan Id
Start Plan-
The communication between BE and BW is done through JMS queues
The communication between BW and iPC is done through JMS queues
The communication between BW and iPE (and viceversa) make use of the iProcess BusinessWorks Server Plug -in
OrderRequest sent internally
Internal messages
Internal messages
OrderRequest
Name Type Multiple Obligatory Description
OrderHeader OrderHeaderType No Yes Element defined on order
level
OrderLines OrderLines No Yes Element defined for each
orderline in the order
OrderHeader
Name Type Multiple Obligatory Description
OrderRef String No Yes Reference of the Siebel
Order. Siebel Order id
customerRef String No Yes Customer id
requiredByDate DateTime No No Date by which order is
expected to be
completed
invoiceAddress GeographicAddressType No No Address for invoice
generation
deliveryAddress GeographicAddressType No No Address for order deliver
Notes String No No ATTRIBUTE
Slas SlasType No No Service level aggrement
UDFs UDFsType No No User defined field
GeographicAddress
Name Type Multiple Obligatory Description
Country String No Yes Country
StateOfProvince String No Yes StateOfProvince
urbanAddress UrbanPropertyAddress
Type
No No urbanAddress
supplementaryLocation String No Yes supplementaryLoca
tion
UrbanpropertyAddress
Name Type Multiple Obligatory Description
streetNr String No No streetNumber
streetName String No No streetName
streetType String No No streetType
Locality String No No Locality
Postcode String No No Postcode
SLAS
Name Type Multiple Obligatory Description
Sla SLAType Yes Yes Element
SLA
Name Type Multiple Obligatory Description
Id SLAType Yes Yes SLA id
UDFS
Name Type Multiple Obligatory Description
UDF UDFType Yes Yes Element
UDF
Name Type Multiple Obligatory Description
Name
String No Yes User defined
Field name
Value
String No Yes Value for the
above field
Orderlines
Name Type Multiple Obligatory Description
orderLine
orderLineType No Yes Complex
element
orderLine
Name Type Multiple Obligatory Description
lineNumber String No Yes Line Item id
productId String No Yes Clarify ProductId
Quantity String No Yes Quantity
UOM String No Yes UOM
orderLineAction NMTOKEN No Yes LineItem Action
requiredByDate
dateTime No No Date by which
lineitem is to be
delivered
Notes String No No Added message
UDFs
UDFsType No No User defined
fields
Slas
slasType No No Service level
aggrement
deliveryAddress
GeographicAddressType No No Address for
deliver
customerItemId String No No CustomerItem Id
characteristics
characteristicsType No No Extra
specification for
line item
Characteristics
Name Type Multiple Obligatory Description
characteristic characteristicType Yes Yes Element
characteristicsType
Name Type Multiple Obligatory Description
characteristicName String No Yes characteristicName
characteristicDesc String No Yes characteristicDesc
characteristicValues characteristicValuesType No Yes characteristicValues
characteristicsValuesType
Name Type Multiple Obligatory Description
characteristicValue characteristicValueType Yes Yes Element
characteristicsValueType
Name Type Multiple Obligatory Description
charValueName String No Yes charValueName
charValueType String No Yes charValueType
charValue String No No charValue
charValueFrom String No No charValueFrom
charValueTo String No No charValueTo
Sample Order XML:
<?xml version="1.0" encoding="UTF-8"?><!-- This order has 3 order lines for PRODUCT_VSRA, SERVICE_VSRA, VSRA_A1 --><jsx2:Order xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:jsx1="http://www.tibco.com/AFF/OM/services" xmlns:jsx2="http://www.tibco.com/AFF/classes/order" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<jsx2:AddressLine1>1290 Sed St.</jsx2:AddressLine1><jsx2:Locality>Everett</jsx2:Locality><jsx2:Region>Fl.</jsx2:Region><jsx2:PostCode>A2R 3K1</jsx2:PostCode><jsx2:Country>Anguilla</jsx2:Country>
</jsx2:InvoiceAddress><jsx2:DeliveryAddress>
<jsx2:AddressLine1>1290 Sed St.</jsx2:AddressLine1><jsx2:Locality>Everett</jsx2:Locality><jsx2:Region>Fl.</jsx2:Region><jsx2:PostCode>A2R 3K1</jsx2:PostCode><jsx2:Country>Anguilla</jsx2:Country>
We will have a Duplicate Order Error Handler procedure- IALDOERR in iPE and the name of this
procedure will be configured in the OrchExceptionHandlerConfig.properties file which is located in <Web
Server Home directory>\server\default\conf\appframeworks folder. This procedure will be publishing the
duplicate order details to the EMS queue: VF.IAL.Queue.Error which is consumed by Common Error
Handling Framework BW process. Please refer section1.4.4.1 for the BW process for the error handling
framework
Below is the relevant part of the OrchExceptionHandlerConfig.properties file
## handler for staffware order amendment exceptionsamendDisabledException.className=com.staffware.frameworks.base.exception.handler.StaffwareExceptionHandleramendDisabledException.sw.procName=IADOERRamendDisabledException.sw.description=Duplicate Order WarningamendDisabledException.sw.userName=ipeadminamendDisabledException.sw.fieldName=WARNING
amendDisabledException.sw.fieldType=MEMO_TYPE
Please refer Dulpicate order error handle procedure for the iPE sub procedure.
1.3.1.3 Fulfillment/Execution Plan generation using AOPD
IPC is in charge of the plan orchestration and iPE is in charge of executing the tasks. The tasks
represented in the fulfillment plan require defining different objects inside IPC and IPE. IPE define
procedures that contain all the logic to execute the tasks. IPC define the process components that
references one IPE procedure and have additional information relevant for the execution (like the duration
of the task, jeopardy conditions, etc.). Finally, IPC defined plan fragments which are execution plan
templates. This plan fragments are assigned to each task in the fulfillment plan (the AOPDRequest). The
plan fragments defined will contain only one process component.
IPC Plan Fragment
IPC Process component
IPE Procedure
The responses required to send back to Siebel per line item will be managed by IPC, this means the last
task in the plan for an order line item will be in charge to call a BW process that sends a the response to
Siebel. Taking this into account, there will be defined three IPE procedures:
1.3.1.4 Process Component
Process components are responsible for the execution of the tasks to achieve the goal of an order.
Process components are part of execution plan and are associated an iProcess subprocedure. Basically
process component acts as a wrapper for the iProcess subprocedure. It consists of:
• Input and output data
• Milestones
• Resource requirements
Input and Output Data
iProcess procedures are created with’field payloads’ that contain the input and output data consumed or
provided by each EAI Orchestration step in a process component. So this is the data exchange between
iProcess procedure and iProcess conductor.
Milestones and Dependencies:
A milestone in a process component is a point in the underlying process which can be dependent on
another event or another milestone in some way.
Milestones arise while considering the inputs and outputs of each activity. For example, the output of the
exchange connection: provide process component may be an exchange ID. It could be that another
activity requires the exchange ID as input. Both of these activities would become milestones, and the
exchange ID part of the process signature.
Milestones may also arise from a significant activity in the process that has to be synchronized with other
activities. For example, suppose in the process component there is an expensive activity that should not
be canceled once it begins. In that case, this activity should be made a milestone near the end of the
process component and have it depend on the other milestones finishing.
In IAL since we have three iProcess procedures, so we will have three process components for executing
all tasks. We will be using iProcess conductor web interface to create process components.
Steps to create process components:
Log into iPC web interface with appropriate credentials.
TIBCO iProcess Conductor > Managed Object Maintenance > Process Components
click on create
In the new window that is displayed, click on Add a new Process Version button
Choose PCGEN from the list of the iProcess procedures displayed to create the generic process
component.
Then complete the below details in the window displayed below and click done.
In Valid From, choose today’s date
Save the process component
Repeat the above process to create Dummy process component for PCDUMMY iProcess procedure and
Last process component for PCLAST iProcess subprocedure. . The following table shows the configured
Plan fragments are execution plan templates that can be use as building blocks in AOPD.Using such fragments makes it easier to develop an execution plan that will fulfill the order. Multiple plan fragments can be combined to form one consolidated plan which then fulfills the order. These plan fragments consists of process components.
In IAL based on the three process components we will be creating three plan fragments as follows: Generic plan fragment Dummy plan fragment Last plan fragment
Steps to create plan fragments:
Log into iPC web interface with appropriate credentials.
Double click on the row with the message "<double-click to set plan header>"
In the new window that is displayed, Enter the following:
o Execution Plan ID: IAL_GEN_EP_01
o Description: Plan fragment for generic component
Click OK.
Now to add the earlier created generic process component in the plan fragment, Click Insert a
new plan task in the execution plan creation window displayed.
Click on the left-most icon (Insert a new Plan Task)
Choose PC_GENERIC from the list (click on the row)
Click OK
The component is added as a Task in the execution plan
Expand it to see the details and see the duration for this process .
Click on the save button to save the plan.
Click the button shown to validate the plan and release it.
Click OK .
The plan status changes to Pending.
Now change the Plan status to Template.
Repeat the above steps for creating plan fragments for Dummy and last process components
respectively. . The following table shows the configured information for the three plan fragments.
Execution Plan ID IAL_GEN_EP_01 IAL_LAST_EP_02 IAL_DUMMY_EP_03
Description Generic Plan fragment Last Task Plan fragment Dummy Task Plan
Fragment
Process Component
ID
PC_GENERIC PC_LAST PC_DUMMY
1.3.1.6 AOPD Request
An execution or fulfillment plan is a collection of the activities that need to be completed to fulfill a
customer order. Execution plans are usually instantiated from execution plan templates that specify how
the process components should be arranged to fulfill the order. If no suitable template is available to meet
a particular order An execution plan or execution plan template consists of the following:
• Plan tasks and their associated process components• Actions• Dependencies
Execution plan can be created manually (Static) or dynamically at run time. IPC provide AOPD framework
for automatically generation of execution Plan. Automatic execution plan development (AOPD) enables to
automate the process of creating these execution plans. AOPD enables to create dynamic execution
plans using plan fragments - which are execution plan templates for parts of the overall plan – as building
blocks.
In IAL AOPD is used for fulfillment/execution plan generation. An AOPD request xml is generated based
on the AOPD request schema defined by iPC. This AOPD request xml is sent on the preconfigured EMS
queue in IPC (queue/AOPDProcessQueue). IPC will generate the AOPD response, detailed execution
plan for that order on basis of the AOPD request and referring the order xml. iPC will then send the AOPD
response to the preconfigured queue "queue/AOPDResponseQueue" and will start the orchestration of
the order on basis of that plan.
AOPD Request: AOPD request is basically prototype or template of the Execution plan upon which actual
execution plan for the particular order is generated. AOPD request is based on the pre defined AOPD
schema structure in iPC.
AOPD request schema.
AOPDRequest
Name Type Multiple Obligatory Description
OrderID String No Yes This is the primary key of the order
for which the AOPD request is
generated.
Originator String No Yes Originator of the AOPD request
Items AOPDItemsType No Yes Complex Element containg tasks
AOPDItems
Name Type Multiple Obligatory Description
Item AOPDItemType Yes Yes Element for each task
AOPDItem
Name Type Multiple Obligatory Description
TaskID String No Yes The task ID of the summary group
that will be created.
This ID must be unique within the
scope of this request.
Description String No No This is an optional element used to
describe this task.
planFragmentUniqueId String No Yes The unique ID of the plan to be
imported as part of the summary
group. The plan must exist in the
iProcess Conductor database
before submiting the
Request.
Udfs UDFsTyp
e
No No Specifies the User-Defined Fields
for this item. Through this, custom
user information can be passed to
the generated plan.
orderLineIds orderLine
IdsType
No No Line Item Id to which this task
belongs to.
Dependencies AOPDDe
pendenci
esType
No No Complex element containing
dpendency element.
Dependency
Name Type Multiple Obligatory Description
Time AOPDTimeType No Yes Complex Element
Point AOPDPointType No Yes Complex Element
AOPDTime
Name Type Multiple Obligatory Description
Type String No Yes Type of dependencies eg. Must
Start On dependencies , Start
No Earlier Than dependencies
timeDelta Long No No The time in milliseconds,
measured from plan activation,
that the milestone or summary
group should start execution.
absoluteTime dateTime No No The absolute time when the
milestone or summary group
should begin executing
consequentialActions JeopardySuperType No No Complex element
Point
Name Type Multiple Obligatory Description
timeDelta Long No No The time in milliseconds,
measured from plan
Activation, that the
summary group should
wait after the
dependency is satisfied.
TaskID String No Yes The ID of the 'dependent
on' summary group.
JeopardySuper
Name Type Multiple Obligatory Description
Def JeopardyDefType Yes No Complex element
containing type and
action element.
JeopardyDefType
Name Type Multiple Obligatory Description
type String No Yes The jeopardy configuration for this
dependency if the milestone or summary
group does not start at the configured date
and time.
This can be one of:
• section.THRESHOLD: Event generated when the time has passed and the milestone or summary
group has not started execution.• section.PREDICTION_CROSSOVER_ UP: Event generated when the dependency is predicted to be violated in the upward direction.• section.PREDICTION_CROSSOVER_ DOWN: Event generated when the dependency is predicted to be violated in the downward direction.
The case starts when an error occured in IPC during order request submission/plan execution etc.
In triggering the EAI BW step it will retry for specified number of time and interval which is configured as SW_QRETRYCOUNT and RETRYINTERVAL in the condition.
In case if the specified number or interval exceeds it will be routed to Script TASK which will be used to write down the error messages to the file.
In case if the specified number or interval doesnot exceed a BW process will be called to publish the error messages on the JMS queue.
Case will then move to condition error type is Retiable or Non Retriable.
If the error type is Retriable it will be routed to the manual Task for AO management to fix the issue.
The Non Retriable errors are not recoverable. The case is directly get terminated.
A predefined input/output parameter template will be defined for iPE subprocedures related to different
process components. These input and output parameters will be used during grafting of different iProcess
sub procedures.
Sub Procedure template for Process components
Name Type Multiple Obligato
ry
Description
SWO_ORDERREF String No Yes Seibel Order id
SWO_ORDERNUMBER String No Yes iPC OrderId
SWO_TASKID String No Yes TaskId for different
events/tasks
ORDER_LINEID String No Yes LineItem Id
SWO_PLANID String No Yes Fulfilment Plan ID
SWO_EXCEPTION String No Yes Order Exception
SWO_ACTION String No Yes Action Code for the
Order
1.3.2.2.6 Plan Fragment Interface – IPE-BW Interface
This is the interface for the communication between IPE sub procedures for Generic Process components and BW. The communication between BW and IPE (and vice versa) makes use of the iProcess BusinessWorks Server Plug-in.
Plan Fragment InterfaceName Type Multiple Obligatory Description
SWO_ORDERREF String No Yes Siebel Order ID
SWO_ORDERNUMBER String No Yes IPC Order ID
SWO_TASKID String No Yes Task ID
ORDER_LINEID String No Yes Order line item ID
XML_UNIQUEID String No Yes XML Unique ID to
fetch the XML for
the event
COMMISSIONABLE Boolean No YES Flag to indicate
whether
commissionable
or not
SERPA_FLAG Boolean No Yes Flag to indicate
whether Serpa or
Non Serpa event
RETRIABLE_INTERFACE Boolean No Yes Flag to indicate