Sie sind auf Seite 1von 44

TIBCO Collaborative Information Manager

Studio
Process Designer Tutorial
Software Release 3.0
September 2010

Important Information
SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED
OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITED
ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLED
SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY OTHER TIBCO SOFTWARE OR FOR
ANY OTHER PURPOSE.
USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF A
LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSE
AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE CLICKWRAP END USER
LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD OR INSTALLATION OF THE
SOFTWARE (AND WHICH IS DUPLICATED IN TIBCO COLLABORATIVE INFORMATION MANAGER
PROCESS DESIGNER USERS GUIDE) OR IF THERE IS NO SUCH SOFTWARE LICENSE AGREEMENT OR
CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S) LOCATED IN THE LICENSE FILE(S)
OF THE SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS AND CONDITIONS, AND
YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN AGREEMENT TO BE BOUND BY
THE SAME.
This document contains confidential information that is subject to U.S. and international copyright laws and
treaties. No part of this document may be reproduced in any form without the written authorization of TIBCO
Software Inc.
TIB, TIBCO, TIBCO Adapter, Predictive Business, Information Bus, The Power of Now, TIBCO Collaborative
Information Manager, TIBCO Collaborative Information Manager Studio, TIBCO Collaborative Information
Manager Process Designer, TIBCO Collaborative Information Manager Repository Designer are either registered
trademarks or trademarks of TIBCO Software Inc. in the United States and/or other countries.
EJB, Java EE, J2EE, and all Java-based trademarks and logos are trademarks or registered trademarks of Sun
Microsystems, Inc. in the U.S. and other countries.
All other product and company names and marks mentioned in this document are the property of their
respective owners and are mentioned for identification purposes only.
THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOT ALL
OPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASED AT THE SAME
TIME. SEE THE README.TXT FILE FOR THE AVAILABILITY OF THIS SOFTWARE VERSION ON A
SPECIFIC OPERATING SYSTEM PLATFORM.
THIS DOCUMENT IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS.
CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE
INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKE
IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN
THIS DOCUMENT AT ANY TIME.
THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR
INDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDING
BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.
Copyright 2007-2010 TIBCO Software Inc. ALL RIGHTS RESERVED.
TIBCO Software Inc. Confidential Information

| iii

Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
TIBCO Collaborative Information Manager Studio Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
Other TIBCO Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
How to Contact TIBCO Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

Chapter 1 Process Designer Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


Tutorial: Create a Sample Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Task A: Create a New Project, Package, and Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Task B: Modify Exit Conditions from the Main Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Task C: Define global and local variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Define Global variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Define Local Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Task D: Add Activities and Parameters to the Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Add an UpdateEvent activity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Define Input Parameters to the UpdateEvent Activity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Task E: Add a Conditional transition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Add DeleteRecord activity for Conditional Transition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define Input Parameters to the DeleteRecord Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define Output Parameters to the DeleteRecord Activity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Add SaveRecord activity for Conditional Transition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define Input Parameters to the SaveRecord Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define Output Parameters to the SaveRecord Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Add Condition Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16
16
16
18
19
19
20
21

Task F: Add more activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


UpdateRecordState Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define Input Parameters to the UpdateRecordState activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define Output Parameters to the UpdateRecordState activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SendProtocolMessage Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define Input parameters to the SendProtocolMessage activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Define Output parameters to the SendProtocolMessage activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
UpdateEvent Activity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Add Input Parameters to the UpdateEvent activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24
24
24
25
26
26
28
29
29

Task G: Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

TIBCO Collaborative Information Manager Process Designer Tutorial

iv

| Contents
Task H: Export the Process to a File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

TIBCO Collaborative Information Manager Process Designer Tutorial

|v

Preface

The TIBCO Collaborative Information Manager (CIM) Studio provides a graphical


interface for designing CIM artefacts and processes. It is based on TIBCO Business
Studio and acts as an 'add on' component to Business Studio.
TIBCO Collaborative Information Manager Studio comprises three components:
the Process Designer, the Repository Designer, and the Rulebase Designer.
The TIBCO Collaborative Information Manager (CIM) Process Designer provides a
graphical user interface for designing processes and can be used to define
processes from scratch or to edit existing CIM processes.

Topics

Related Documentation, page vi

Typographical Conventions, page vii

How to Contact TIBCO Support, page ix

TIBCO Collaborative Information Manager Process Designer Tutorial

vi

|
Related Documentation
This section lists useful documentation resources.

TIBCO Collaborative Information Manager Studio Documentation


The following documents form the TIBCO Collaborative Information Manager
Studio documentation set:

TIBCO Collaborative Information Manager Rulebase Designer Users Guide.

TIBCO Collaborative Information Manager Rulebase Designer Tutorial.

TIBCO Collaborative Information Manager Repository Designer Users Guide.

TIBCO Collaborative Information Manager Repository Designer Tutorial.

TIBCO Collaborative Information Manager Process Designer Users Guide.

TIBCO Collaborative Information Manager Process Designer Tutorial

TIBCO Collaborative Information Manager Studio Release Notes

Other TIBCO Product Documentation


You may find it useful to read the documentation for the following TIBCO
products:

TIBCO Collaborative Information Manager Workflow Reference Guide: This guide


is a reference for writing application workflows.

TIBCO Collaborative Information Manager Process Designer Tutorial

| vii
Typographical Conventions
The following typographical conventions are used in this manual.
Table 1 General Typographical Conventions
Convention

Use

TIBCO_HOME

Many TIBCO products must be installed within the same home directory. This
directory is referenced in documentation as TIBCO_HOME. The value of
TIBCO_HOME depends on the operating system. For example, on Windows
systems, the default value is C:\tibco.

ENV_HOME

Other TIBCO products are installed into an installation environment.


Incompatible products and multiple instances of the same product are installed
into different installation environments. The directory into which such products
are installed is referenced in documentation as ENV_HOME. The value of
ENV_HOME depends on the operating system. For example, on Windows
systems the default value is C:\tibco.
code font

Code font identifies commands, code examples, filenames, pathnames, and


output displayed in a command window. For example:
Use MyCommand to start the foo process.

bold code
font

italic font

Bold code font is used in the following ways:

In procedures, to indicate what a user types. For example: Type admin.

In large code samples, to indicate the parts of the sample that are of
particular interest.

In command syntax, to indicate the default parameter for a command. For


example, if no parameter is specified, MyCommand is enabled:
MyCommand [enable | disable]

Italic font is used in the following ways:

To indicate a document title. For example: See TIBCO BusinessWorks Concepts.

To introduce new terms For example: A portal page may contain several
portlets. Portlets are mini-applications that run in a portal.

To indicate a variable in a command or code syntax that you must replace.


For example: MyCommand pathname

TIBCO Collaborative Information Manager Process Designer Tutorial

viii

|
Table 1 General Typographical Conventions (Contd)
Convention

Use

Key
combinations

Key name separated by a plus sign indicate keys pressed simultaneously. For
example: Ctrl+C.
Key names separated by a comma and space indicate keys pressed one after the
other. For example: Esc, Ctrl+Q.
The note icon indicates information that is of special interest or importance, for
example, an additional action required only in certain circumstances.
The tip icon indicates an idea that could be useful, for example, a way to apply
the information provided in the current section to achieve a specific result.
The warning icon indicates the potential for a damaging situation, for example,
data loss or corruption if certain steps are taken or not taken.

TIBCO Collaborative Information Manager Process Designer Tutorial

| ix
How to Contact TIBCO Support
For comments or problems with this manual or the software it addresses, please
contact TIBCO Support as follows.

For an overview of TIBCO Support, and information about getting started


with TIBCO Support, visit this site:
http://www.tibco.com/services/support

If you already have a valid maintenance or support contract, visit this site:
https://support.tibco.com
Entry to this site requires a user name and password. If you do not have a user
name, you can request one.

TIBCO Collaborative Information Manager Process Designer Tutorial

TIBCO Collaborative Information Manager Process Designer Tutorial

|1
Chapter 1

Process Designer Tutorial

This chapter contains a tutorial that walks you through the steps to create a
process in the CIM Process Designer.

Topics

Task A: Create a New Project, Package, and Process, page 3

Task B: Modify Exit Conditions from the Main Process, page 9

Task C: Define global and local variables, page 10

Task D: Add Activities and Parameters to the Process, page 13

Task E: Add a Conditional transition, page 16

Task F: Add more activities, page 24

Task G: Validation, page 31

Task H: Export the Process to a File, page 33

TIBCO Collaborative Information Manager Process Designer Tutorial

|
Tutorial: Create a Sample Process
To get started with the Process Designer, use this tutorial to create a simple
process. In this tutorial, we will do the following:

Create a new Project to contain the Process.

Modify handlers in the Main Process to handle cancellation.

Define some global and local variables that will be used later.

Start the Process definition by adding an activity and some input and output
parameters.

Add a conditional transition.

Continue the Process definition with more activities and parameters.

Validate the Process.

Export the Process to a file.

TIBCO Collaborative Information Manager Process Designer Tutorial

|3
Task A: Create a New Project, Package, and Process
In this section, we follow a simple wizard to create a new Project to hold the
process definition.
The first step is to create a Project that will contain the Process. A Project contains
a Package, and a Package contains Processes.
Follow these steps to create a Project:
1. In TIBCO Business Studio, select File->New->BPM/SOA Developer Project.
This starts up the new Project wizard.

2. In the new Project dialog, enter Sample for the Project name. The Use default
location checkbox is selected by default, indicating that the project will be

TIBCO Collaborative Information Manager Process Designer Tutorial

|
saved to the installation directory. You can browse and select a different
location. Select CIM as the Destination Environment. Click Next.

TIBCO Collaborative Information Manager Process Designer Tutorial

|5
3. The Asset Type Selection dialog is displayed. Ensure that the following is
selected and click Next.
Business Processes (under BPM)
Business Object Model and CIM mlXML Model (under Business Objects)
CIM Activity WSDL and Service Descriptors (under Services).

4. The Business Processes dialog is displayed next and prompts you to set the
process packages folder. Click Next.

TIBCO Collaborative Information Manager Process Designer Tutorial

|
5. The new process package resource that will be created is displayed - this is the
xpdl file. Click Next.

6. The process package details are displayed. Leave all the default names and
click Next.

TIBCO Collaborative Information Manager Process Designer Tutorial

|7
7. The Select Template dialog is displayed next and prompts you to select a
package template. Select CIM Package Template under Package Templates
and click Finish.

Sample Flow Layout and Project Components


The newly-created Project is displayed in the Project Explorer. You can expand the
Project to display the Process Package and Processes; expand the Processes to see
a Main Process and a Sub Process.

TIBCO Collaborative Information Manager Process Designer Tutorial

|
Double-click the CIM Main process in the Project Explorer to display the process
diagram in the Process Editor. The Process Editor is where you create your
business process; it provides a modeling view where you can see all components
in the process. It also includes a Palette with tools you can use to create your
Process diagram.

This is a modeling view of the main process which contains:

A start event.

A main process, which in turn references an independent sub-process.

An end event.

Exit conditions - A cancel, exception, and timeout handler.

TIBCO Collaborative Information Manager Process Designer Tutorial

|9
Task B: Modify Exit Conditions from the Main Process
In this section, we modify the Cancel Handler to handle cancellation from any
point in the process.
1. Click on the Cancel Handler - its properties will be displayed in the Properties
Window below.
2. Click the Select button against Operation.
3. In the Operation Picker dialog that is displayed, select UpdateEvent and click
OK.
4. Enter a description in the Description tab, for example, "Set the event state to
Cancelled/Done".

Similarly, you can edit properties for the Timeout or Exception Handlers or just
remove the activities with the timeout and exception handler.

TIBCO Collaborative Information Manager Process Designer Tutorial

10

|
Task C: Define global and local variables
In this section, we define two global variables - InDoc and Outdoc - that are
defined in the context of the process. We also define some local variables.
In the Process Designer, global variables are defined at the package level, and
local variables at the process level. Once you create a new project, you will see
Data Fields under the Process package (you define global variables from here) as
well as under the process itself (you define local variables from here).

Define Global variables


Go to the Project Explorer and navigate to your Sample project. Right click Data
Field (under Process Packages) and select New->Data Field. Define the following
global variables:

InDoc
1. In the Data Field Details dialog, change the label to InDoc and set the
Declared Type to InDocument. Click Finish.

TIBCO Collaborative Information Manager Process Designer Tutorial

| 11
OutDoc
1. In the Data Field Details dialog, change the label to OutDoc and set the
Declared Type to OutDocument.
2. Click Finish.

In the following sections, we define some parameter values which get mapped to
these global variables.

Define Local Variables


Do the following to define local variables:
In the Project Explorer, go to Data Field within the subprocess.
Right click Data Field and select New->Data Field.
In the Data Field Details dialog displayed:
Provide a label for the data field, and set the Declared Type as required
(Indocument, InString and so on).

TIBCO Collaborative Information Manager Process Designer Tutorial

12

|
Create the following local variables with the following values.
Data Field Name

Set Declared Type to

RecordsDeleted

OutLong

RecordsProcessed

OutLong

RecordsAttempted

OutLong

ErrorsFound

OutLong

commandStatus

OutString

workDoc

InDocument

EAIResponse

OutDocument

In the following sections, we map these local variables to some activity input and
output parameters.

TIBCO Collaborative Information Manager Process Designer Tutorial

| 13
Task D: Add Activities and Parameters to the Process
In this section, we begin defining our process by adding activities and
parameters.We start by adding an UpdateEvent activity to update the event
details. We also define input parameters for this activity.
How to add activities
The following sections will guide you through adding activities to define your
process. Follow these generic instructions to add an activity to your process flow:
1. In the Project Explorer, navigate to your Project and expand Service
Descriptors.
2. Select CIMServices.wsdl->CimActivities-><activityname> and drag and
drop the activity into your process model, at the instructed location.
3. Select Create Service Task for Operation from the drop down displayed
when you add the activity to your flow (links between the newly added
activity and the rest of the flow are automatically created).
How to define Input parameters
1. Select the activity (that you want to define parameters for) in the process flow.
2. In the Properties Window, go to the Input to Service tab.
3. Expand the <activityname> input parameters on the right.
4. Follow the instructions to make modifications to set parameter values.
How to define Output parameters
1. Select the activity (that you want to define parameters for) in the process flow.
2. In the Properties Window, go to the Output to Service tab.
3. Expand the <activityname> output parameters on the left.
4. Follow the instructions to make modifications to set parameter values.
Double-click the sub process CIMProcess from the Project Explorer. This is the
basic sub process that was created as a result of using the CIM template.

TIBCO Collaborative Information Manager Process Designer Tutorial

14

|
Add an UpdateEvent activity
1. Add an UpdateEvent activity to the process by dragging and dropping it into
your process model after the Start event. (this activity updates the event
details).

2. Rename the UpdateEvent activity to AddMsgInfoToEvent by going to the


Properties window and editing the label in the General tab.

Define Input Parameters to the UpdateEvent Activity


eventState parameter
1. Select the eventState parameter.
2. Drag it onto New Script on the left and call it eventState_Value.
3. In the Script Editor section, set the value to 'START'.
eventType parameter
1. Select the eventType parameter.
2. Drag it onto New Script on the left and call it eventType_Value.
3. In the Script Editor, set the value to 'CAT'.
eventDescriptor parameter
1. Select the source attribute of the eventDescriptor parameter.
TIBCO Collaborative Information Manager Process Designer Tutorial

| 15
2. Map it to the subtype of the inDoc parameter
($inDoc/Body/Document/subtype)
deploymentMode parameter
1. Select the source attribute of the deploymentMode parameter
2. Map it to the messageType of the inDoc parameter ($inDoc/MessageType)

How your workflow will look at this point


This is how your workflow should look:

TIBCO Collaborative Information Manager Process Designer Tutorial

16

|
Task E: Add a Conditional transition
In this section, we continue our process definition by adding SaveRecord and
DeleteRecord activities, controlled by a conditional transition that looks for a
Master Catalog name, and based on that, it either deletes or saves the record.
When we added the UpdateEvent activity (to the basic flow created by the CIM
template) after the Start Event, an uncontrolled transition was automatically
created between the Start Event and the UpdateEvent activity.
Next, lets create a conditional transition. We will either save or delete the record
depending on the Master Catalog name in the InDocument. By default, the record
will be saved, and only if the Master Catalog name is ASSET, the record will be
deleted.
We will do the following in this section:

Add DeleteRecord activity for Conditional Transition


Define Input Parameters to the DeleteRecord Activity
Define Output Parameters to the DeleteRecord Activity

Add SaveRecord activity for Conditional Transition


Define Input Parameters to the SaveRecord Activity
Define Output Parameters to the SaveRecord Activity

Add DeleteRecord activity for Conditional Transition


1. Add a DeleteRecord activity to your process (to the right of
AddMsgInfoToEvent).

Define Input Parameters to the DeleteRecord Activity


InDocument parameter
1. Select the InDocument parameter.
2. Drag it on to the workDoc global variable on the left.

TIBCO Collaborative Information Manager Process Designer Tutorial

| 17
MasterCatalog parameter
1. Select the MasterCatalog parameter.
2. Drag it onto New Script on the left and call it MasterCatalog_Value.
3. In the Script Editor, set the value to 'ASSET'.
ProductIds parameter
1. Select the source attribute in the ProductIds parameter.
2. Drag it onto the DBID attribute of the workDoc global variable on the left.
(workDoc/Body/Document/BusinessDocument/CatalogAction/CatalogActio
nDetails/CatalogItem/PartNumber/GlobalPartNumber/ProddID/DBID)

RecordKey parameter
1. Select the source attribute in the RecordKey parameter.
2. Drag it onto the language attribute of the outDoc global variable on the left.
(OutDoc/Body/Document/BusinessDocument/CatalogAction/CatalogAction
Header/supplier/partner/name/language)

VersionOption parameter
1. Select the VersionOption parameter.
2. Drag it onto New Script on the right and call it VersionOption_Value.
3. In the Script Editor, set the value to 'LATEST'.
eventState parameter
1. Select the eventState parameter.
2. Drag it onto New Script on the right and call it eventState_Value.

TIBCO Collaborative Information Manager Process Designer Tutorial

18

|
3. In the Script Editor, set the value to 'DELETERECORDS'.

Define Output Parameters to the DeleteRecord Activity


RecordsDeleted parameter
1. Select the RecordsDeleted output parameter on the left.
2. Drag it onto the RecordsDeleted local variable on the right.
RecordsProcessed parameter
1. Select the RecordsProcessed output parameter on the left.
2. Drag it onto the RecordsProcessed local variable on the right.

TIBCO Collaborative Information Manager Process Designer Tutorial

| 19
Add SaveRecord activity for Conditional Transition
1. Add a SaveRecord activity in your process (below DeleteRecord).

Define Input Parameters to the SaveRecord Activity


ExecutionMode parameter
1. Select the ExecutionMode parameter.
2. Drag it onto New Script on the left and call it ExecutionMode_Value.
3. In the Script Editor, set the value to 'SYNCHR'.
ErrorSeverity parameter
1. Select the ErrorSeverity parameter.
2. Drag it onto New Script on the left and call it Severity_Value.
3. In the Script Editor, set the value to '9'.
VersionOption parameter
1. Select the VersionOption parameter.
2. Drag it onto New Script on the left and call it VersionOption_Value.

TIBCO Collaborative Information Manager Process Designer Tutorial

20

|
3. In the Script Editor, set the value to 'LATEST'.

Define Output Parameters to the SaveRecord Activity


RecordsDeleted parameter
1. Select the RecordsWithErrors output parameter on the left.
2. Drag it onto the ErrorsFound local variable on the right.
RecordsAttempted parameter
1. Select the RecordsAttempted output parameter on the left.
2. Drag it onto the RecordsAttempted local variable on the right.
WorkDoc parameter
1. Select the OutDocument output parameter on the left.

TIBCO Collaborative Information Manager Process Designer Tutorial

| 21
2. Drag it onto the workDoc local variable on the right.

Add Condition Logic


1. On the Palette, click XOR Data Gateway and place your cursor on the
sequence flow between the Initialize Event and DeleteRecord.

2. Add a Sequence flow from the XOR Gateway to the Save Record
(by selecting the Sequence Flow tool under connections in the Palette).

3. Mark the transition from the XOR gateway to SaveRecord as default by


selecting the transition and then selecting Default in the Properties Windows,

TIBCO Collaborative Information Manager Process Designer Tutorial

22

|
Sequence Flow, General tab. The transition to the SaveRecord task will then
get a small slash to indicate it is default.

4. Click the sequence flow to the DeleteRecord task.


a. In the Properties Window, General tab, set the Sequence Flow Type to
Conditional.
b. Set the Script Defined As to Free Text.
c. Manually enter the code for the condition in the Describe Sequence Flow
Condition textbox.

TIBCO Collaborative Information Manager Process Designer Tutorial

| 23
How your workflow will look at this point

TIBCO Collaborative Information Manager Process Designer Tutorial

24

|
Task F: Add more activities
Next, we add activities for the rest of the process (after deletion or save of the
record). We will do the following:
Add an Activity to set the record state to approved (UpdateRecordState).
Add an Activity to publish to EAI (SendProtocolMessage).
Set the Status to success (UpdateEvent).

UpdateRecordState Activity
1. Add an UpdateRecordState activity (after the DeleteRecord activity).
2. Ensure that both the DeleteRecord and SaveRecord activities are connected
to the UpdateRecordState activity (use the Sequence tool to make the
required connections).
3. Change the label of the UpdateRecordState activity to
UpdateRecordStateAsApproved.

Define Input Parameters to the UpdateRecordState activity


Status parameter
1. Select the Status parameter.
2. Drag it onto New Script on the left and call it Status_Value.
3. In the Script Editor, set the value to 'CONFIRMED'.

TIBCO Collaborative Information Manager Process Designer Tutorial

| 25
inDocument parameter
1. Select the InDocument parameter.
2. Map it to a workDoc local variable.

Define Output Parameters to the UpdateRecordState activity


commandStatus parameter
1. Select the commandStatus local variable on the right.
2. Drag it onto the CommandStatus output parameter on the left.

How your workflow will look at this point

TIBCO Collaborative Information Manager Process Designer Tutorial

26

|
SendProtocolMessage Activity
1. Add a SendProtocolMessage activity (after the UpdateRecordState activity).
2. Change the label of the SendProtocolMessage activity to PublishtoEAI.

Define Input parameters to the SendProtocolMessage activity


ExecutionMode parameter
1. Select the ExecutionMode parameter.
2. Drag it onto New Script on the left, and call it ExecutionMode_Value.
3. In the Script Editor, set the value to 'ASYNCHR'.
BizProtocol parameter
1. Select the BizProtocol parameter.
2. Drag it onto New Script on the left and call it BizProtocol_Value.
3. In the Script Editor, set the value to 'JMS'.
ChannelCredential parameter
1. Select the ChannelCredential parameter.
2. Drag it onto New Script on the left and call it ChannelCredential_Value.
3. In the Script Editor, set the value to '0065063183367'.
ExpiryDate parameter
1. Select the ExpiryDate parameter.
2. Drag it onto New Script on the right and call it ExpiryDate_Value.
3. In the Script Editor, set the value to '0:0:5:0'.

TIBCO Collaborative Information Manager Process Designer Tutorial

| 27
ExpiryType parameter
1. Select the ExpiryType parameter.
2. Drag it onto New Script on the left and call it ExpiryType_Value.
3. In the Script Editor, set the value to 'RELATIVE'.
inDocument parameter
1. Select the ExpiryType parameter.
2. Drag it onto the workDoc variable on the left.
MessageID parameter
1. Select the source attribute of the MessageID parameter.
2. Drag it onto the externalControlNumber attribute of the inDoc variable on the
left.
PayloadPackingScheme parameter
1. Select the PayloadPackingScheme parameter.
2. Drag it onto New Script on the left and call it PayloadPackingScheme_Value.
3. In the Script Editor, set the value to 'STANDARD_INTEGRATION'.
SenderCredential parameter
1. Select the SenderCredential parameter.
2. Drag it onto New Script on the left and call it SenderCredential_Value.
3. In the Script Editor, set the value to '0065063183367'.
DefaultDomain parameter
1. Select the DefaultDomain parameter.
2. Drag it onto New Script on the left and call it DefaultDomain_Value.
3. In the Script Editor, set the value to 'GLN'.
eventState parameter
1. Select the eventState parameter.
2. Drag it onto New Script on the left and call it eventState_Value.

TIBCO Collaborative Information Manager Process Designer Tutorial

28

|
3. In the Script Editor, set the value to 'SENDCATALOG'.

Define Output parameters to the SendProtocolMessage activity


OutDocument
1. Select the Outdocument parameter on the left.
2. Drag it onto the workDoc variable on the right.
RecordsAttempted
1. Select the RecordsAttempted parameter on the left.
2. Drag it onto the RecordsAttempted variable on the right.
RecordsWithErrors
1. Select the RecordsWithErrors on the left.

TIBCO Collaborative Information Manager Process Designer Tutorial

| 29
2. Drag it onto the ErrorsFound variable on the right.

How your workflow will look at this point

UpdateEvent Activity
1. Add a UpdateEvent activity (after the SendProtocolMessage activity).
2. Change the label of the UpdateEvent activity to SetStatusToSuccess.

Add Input Parameters to the UpdateEvent activity


eventState parameter
1. Select the eventState parameter.
2. Drag it onto New Script on the left and call it eventState_Value.
3. In the Script Editor, set the value to 'DONE'.
eventStatus parameter
1. Select the eventStatus parameter.
TIBCO Collaborative Information Manager Process Designer Tutorial

30

|
2. Drag it onto New Script on the right and call it eventStatus_Value.
3. In the Script Editor, set the value to 'SUCCESS'.
eventDescriptor parameter
1. Select the eventDescriptor parameter.
2. Drag it onto New Script on the left and call it eventDescriptor_Value.
3. In the Script Editor, set the value to 'FromBW'.

How your workflow will look at this point


Your workflow is now complete and this is how it will look:

TIBCO Collaborative Information Manager Process Designer Tutorial

| 31
Task G: Validation
The process now needs to be validated to ensure that there are no errors.
The CIM validation plug-in runs in the background as the user modifies or edits
the process; it checks that changes are made in accordance with the Validation
rules.
Validations are triggered when the destination of the Process is set as CIM.
All errors will show up in the Problems tab of the Properties Window.
The following validations are performed to ensure conformity to CIM standards:

All Activity Tasks to Web Service


All Activity types should be set to Web Service. Usage of any other activity
type will result in an error.

All Service Tasks to CIM Service


CIM Service should be chosen for all Service Tasks. No other services are
supported.

Single starting point for process


The process should have only a single starting point. Activities which do not
have an incoming transitions are considered a starting point.

Unique Activity Names


Each activity should have a unique name, which is mapped to the CIM
activity name.

Only XOR and Parallel Gateways


Gateway Type should be XOR (Exclusive Decision/Merge Data or Event
based) or AND (Parallel Fork/Join). No other Gateway Types are supported.

No Embedded Sub Processes


Embedded subprocesses are not supported by the CIM export mapping (since
there is no equivalent semantics in the CIM workflow engine).

Properly defined parameters


Each global Process parameter and data field must have the attributes
Direction, Eval, and Type properly and sufficiently defined.

No Multiple Uncontrolled Transitions


Multiple uncontrolled transitions should not be present since they are not
supported by the CIM workflow engine. If there is more than one outgoing
transition from an activity, a gateway has to be used.

Intermediate Event Restrictions


Intermediate events are restricted to exception, timeout, cancel, and Link
Event. Use of any other type will result in an error.
TIBCO Collaborative Information Manager Process Designer Tutorial

32

|
These are some of the validations; for a complete list of validations, refer to the
TIBCO Collaborative Information Manager Process Designer Users Guide.

TIBCO Collaborative Information Manager Process Designer Tutorial

| 33
Task H: Export the Process to a File
Now that the CIM Workflow has been defined and edited, it needs to be exported
back to CIM.
Follow these steps to export the process:
1. First, ensure that the Destination for the Process is set to CIM.To do this:
Select the Process under Processes in the Project Explorer.
In the Properties Window, click the Destinations Tab.
Select the CIM checkbox.
Do this for all the Processes and sub processes.

2. Right-click the Process Package (xpdl file) in the Project Explorer and select
the Export option.

TIBCO Collaborative Information Manager Process Designer Tutorial

34

|
3. Select CIM Process XML under CIM Process Designer and click Next.

4. Select the location to export the process (xpdl) to. You can either export it to
the default projects export folder, or to a file. Click Finish.

5. The export is now complete. If you go to the location where you chose to
export the file, you will see an xml output file. This is the xpdl process file
which has been converted to the CIM Engine xml format.

TIBCO Collaborative Information Manager Process Designer Tutorial