• Entries (RSS)
  • Comments (RSS)

Business calendars in WID 6.1.2

Posted by | Posted in Websphere Process Server / Integration Developer | Posted on 29-07-2008

Tagged Under : , , , , ,

Today I want to introduce an exciting new feature of WID 6.1.2 that I came across while reading a developer works article http://www.ibm.com/developerworks/websphere/library/techarticles/0807_fasbinder1/0807_fasbinder.html?S_TACT=105AGX01&S_CMP=HP&ca=drs- .

In WebSphere Integration Developer 6.1.2 we have the option to create a business calendar which is very crucial when we deal with human tasks. I haven’t upgraded to WID 6.1.2 yet. However looking into the pictures in that article it looks really great. It was a feature that was really missing in the earlier versions of WID.

In my current project we had a requirement to set up an escalation after 8 business hours. When we calculate the business hours we had to exclude Saturdays, Sundays and any other holidays in US. Also our escalation time should not include anything other than the normal business hours. For us we ended up in writing our own business calendar to meet our requirements.

I am wondering how IBM can miss such an important feature in earlier versions of WID. Anyways thanks IBM for adding it now.

I did not see WID 6.1.2 yet, so I am wondering is there any way to set up a time zone also for different tasks or users. This is extremely important when the business works on different geographies and time zones. If it is not already there, that is something IBM should consider in the coming versions.

Also is there any way to modify the calendar without a deployment something like a Business Rule Manager? I feel WPS should have something like that as its does not make any sense for a new deployment just because a new unexpected holiday is coming or we missed to count a holiday at the time of deployment. Let the business users manage the holidays and business timings. Yeah?

Also I feel a date picker for setting the time/date values in WID will be a good addition.

Let me upgrade to the newer version and see what the other new exciting features in WID are.

Edit: Upgraded to WID 6.1.2. A new tutorial on creating business calendar has been added.

Share

Running a correlation set

Posted by | Posted in Websphere Process Server / Integration Developer | Posted on 23-07-2008

Tagged Under : , , , , , ,

Running a business process that contains correlation set.

My previous post was about creating a correlation set using WID. Today my post is about running a correlation set using BPC explorer. Unlike running a process or human task, running a process that contains the correlation set is little tricky.

Starting a business process is straight forward. Just logon to your BPC Explorer (The url will be http://localhost:9080/bpc/ unless you have changed the default port while installing the process server.). And click on ‘My Processes Templates’. It will list all the available process templates. Select your business process template and click on Start Instance. From the new page appeared enter a name for your process if you want and enter the process input message and submit. Your process will be started. The input we have given will be for the first receive activity.

Now if you look into the process state, the first receive activity will be finished and the second receive activity will be waiting in a waiting state. I.e., now the business process is waiting for the second receive activity to be invoked.

To invoke the second receive activity, click on the link ‘Started by me’

Processes started by me

Processes started by me

Click on your process instance. In my case I had given the name ‘testHello’ when starting the process. This will take you to the Process instance details page. Now click on the ‘Events’ tab.

Process Instance

Process Instance

We can see an operation is listed there. This will be the operation associated with the second receive activity. Click on that operation and we will be taken to the ‘Send event’ page.

Send Event

Send Event

Enter the name you have entered while creating the process and click on Submit.

You are done. Your second receive activity also got invoked.

Thanks Richard W Gregory for teaching me how to run a business process that is having a correlation set in it.

Share

Creating a correlation set WebSphere Integration Developer

Posted by | Posted in Websphere Process Server / Integration Developer | Posted on 21-07-2008

Tagged Under : , , , , , ,

This is something I was planning to post for a long time. Due to some or other exceptions I was getting, I couldn’t make it till today. Today’s post is about creating a correlation set in WebSphere Integration Developer. In my example I used a new module for creating the correlation set.

A correlation set is used for associating an external message with the correct process instance. To create a process that is using a correlation set first create an interface with two operations. In my case I am planning for a business process with two receive activities. My interface looks like the one shown below.

Interface

Now create a new process using the interface we created in previous step. Use the sayHello method as the operation for this process. Make sure that you have made this process as a long running process and add a second receive to this process. Finally after adding all the elements the business process would look like this.

business process

business process

Don’t worry about the error messages. Set the TestInterface as the partner for the second receive activity also. Select printName as the method name. Now most of the errors will be disappeared. However still there will be some errors present and it is because we don’t have a correlation set defined for the second receive activity. So now it is the time to define a correlation set. To create a correlation set for the business process follow the below steps.

1. Click on ‘Add correlation set’ icon next to Correlation sets from the tray.

Add correlation Set

Add correlation Set

2. Enter the name you want and select it.

3. Click on Details from properties window.

4. Now create a correlation property.
4.1. Click on Add
4.2. From th ‘Select Property’ window, click on New.
4.3. Enter a name for your property.
4.4. Click Browse and select the type of your property.
4.5. Create an Alias by clicking on New button next to Aliases label.
4.6. From ‘Create Property Alias’ window, select the interface and the operation.

Create Property Alias

Create Property Alias

4.7. Repeat it from the second operation also.
4.8 Click on OK

Create Correlation Property

Create Correlation Property

5. The correlation set is ready now. The next step is to associate the correlation set to the receive activities.

6. Click on Correlation from the first Receive activities’ properties area.

7. Click on Add. The correlation property will be added. Select initiation property as Yes and direction as Receive.

Recieve correlation

Receive correlation

8. Click on second receive activity and add the correlation property. Here set the initiation property value as Join.

8. Build the project. Now all the errors will be disappeared from the module.

Share

CWWBA0140E: No process instance found for the process template

Posted by | Posted in Websphere Process Server / Integration Developer | Posted on 19-07-2008

Tagged Under : , , , , ,

Another exception with correlation sets. This exception comes if initiation property of correlation set is set to No. The exception stacktrace is

com.ibm.bpe.api.CreateRejectedException: CWWBA0140E: No process instance found for the process template 'XXXX' and createInstance is false for port type '{http://XXXX/XXX}XXX' and operation 'XXXX'
at com.ibm.bpe.engine.BpelEngineCore.createAndStartProcessInstance(BpelEngineCore.java:513)
at com.ibm.bpe.engine.BpelEngine.createAndStartProcessInstance(BpelEngine.java:188)
at com.ibm.bpe.framework.sca.ProcessSessionBean.createOrFindInstance(ProcessSessionBean.java:1429)
at com.ibm.bpe.framework.sca.ProcessSessionBean.invokeEngineSync(ProcessSessionBean.java:911)

The solution for this problem is to change the initiation property of correlation set to Join. We would see this exception when we send an event to the correlation set. This exception is because the correlation set is not able to find an existing process for sending the event.

The same exception can occur even if the correlation set initiation property is set to Join also. This is because the value that we are sending to the correlation set does not exist for the correlation set property. So make sure that you are sending a valid value for any of an existing process.

Thanks Dan for helping me out in finding a solution to this problem.

Share

com.ibm.bpe.database. TomDuplicateKeyException: (com.ibm.bpe. database. CorrelationSetInstanceB: PNUDx)

Posted by | Posted in Websphere Process Server / Integration Developer | Posted on 17-07-2008

Tagged Under : , , , , ,

CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method “bpc_invoke” on bean “BeanId(XXXApp#XXXEJB.jar#component.XXXX, null)”. Exception data: com.ibm.bpe.database.TomDuplicateKeyException: (com.ibm.bpe.database.CorrelationSetInstanceB: PNUDx)

This is the exception I got when I tried to send an event to an operation. The complete stacktrace of the application is

CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "bpc_invoke" on bean "BeanId(XXXApp#XXXEJB.jar#component.XXXX, null)". Exception data: com.ibm.bpe.database.TomDuplicateKeyException: (com.ibm.bpe.database.CorrelationSetInstanceB: PNUDx)
PIID                          = _PI:9003011b.356b88eb.dfa2c038.977f0038
COID                          = _CO:9024011b.356a6d43.dfa2c038.977f0020
SIID                          = _SI:9010011b.356b8a14.dfa2c038.977f0043
processName                   = XXXX
PTID                          = _PT:9001011b.356a6d43.dfa2c038.977f0016
status                        = ACTIVE
hashCode                      = null
data                          = null
dataLong                      = null
versionId                     = 0
(com.ibm.bpe.database.CorrelationSetInstanceB: Pnudx)
PIID                          = _PI:9003011b.356b88eb.dfa2c038.977f0038
COID                          = _CO:9024011b.356a6d43.dfa2c038.977f0020
SIID                          = _SI:9010011b.356b8a14.dfa2c038.977f0043
processName                   = XXX
PTID                          = _PT:9001011b.356a6d43.dfa2c038.977f0016
status                        = ACTIVE
hashCode                      = [B@6bbd689b
data                          = CS-CorrelationSet-Val=Albin1_/
dataLong                      = null
versionId                     = 0
	at com.ibm.bpe.database.TomCacheBase.addOrReplace(TomCacheBase.java:226)
	at com.ibm.bpe.database.Tom.newCorrelationSetInstanceB(Tom.java:11040)

This error was because the Correlation Sets initiation property was set to Yes. If the initiation property of correlation set to Yes, it will create a new process instance with the correlation value if the receive is invoked. So I believe in our case WPS was trying to create a new process with the same id. That could be the reason for that TomDuplicateKeyException. Anyways this issue got resolved when I changed the initiation property value to join.

Share