Introduction
Today I was struggling with the File Connector in combination with CARS authentication and the multi-tenancy within Cordys. I really like the multi-tenancy concept, but some features in Cordys are not mature yet.
Context
We have a project with a lot of Organizations using the same BPM processes. These processes are deployed within the System Organization. The Organizations (the number can be up to 2000 !) are provisioned using Cordys Cloud Provisioning (CCP). The (Cordys) Users are authenticated through WS-Security within the soap headers.
In one of the processes we want to do a call within the context of another Organization.
Options
When I read the community blogs and asked some people they came up with
1 - UDDI Interceptor
In this case you call a webservice of Cordys through a UDDI connector and use an interceptor to add the WS-Security header. The user authenticated has been put within a default Organization, so this way the call is done within the context of that users Organization.
Note: There is a lot of information within the community to write such an interceptor.
Note2: It is not a very elegant solution, because you would expect this to be configurable within the UDDI connector itself (just like any other EAI/BPM tool)
However there was a catch, so that this option did not work. All processes are deployed within System and the BPM process is deployed within a BPM Service Container with namespace N and operation OP. When this method is to be called from within a UDDI connector (and this UDDI connector is also in System Organization), this is done with the same namespace N and operation OP.
So Cordys has actually two Service Containers where to send the message to
2 - File Poller
Because the call has to be done after a file has been placed on some directory, the file poller would be another option. In this case the trigger of the file poller would be a call to the BPM webservice with another Organization as context.
So the XML Poller configuration looks something like:
However this time you ran into the problem that the trigger does not insert a WS-Security header.
(see also http://code.google.com/p/cordysfilecon/issues/detail?id=33)
The way this could be solved was by using another soap request:
Thanks, Roger van de Kimmenade
SOA, EAI, BPM, Oracle, Cordys
I use the blog to share my experience and personal opinion within the SOA/EAI/BPM domain.
2011/09/28
2011/09/12
Provisioning: Defining an Application
Introduction
This blog item shows an example on how to define an application that can be used by other Organisations. In this example we have a simple Cordys BOP4 setup. We have only the Default Cluster. In this example the ISV packages are made and it will show how to define the application within CCP. It will show how easy this is within CCP. After this you are able to Provision organisations to use applications within the Cloud.
An introduction to CPP was already given here.
Define the Business Partner
First you will have to define a business partner that developed the ISV. This business partner is needed when defining the Application.
Note: A CCP application is NOT a synonym for a ISV package. An application can encompass several packages and a package can be used for the definition of several applications.
Tip: It is advised to put functional roles in a separate ISV package, maybe in a later blog item i will come back to this.
This blog item shows an example on how to define an application that can be used by other Organisations. In this example we have a simple Cordys BOP4 setup. We have only the Default Cluster. In this example the ISV packages are made and it will show how to define the application within CCP. It will show how easy this is within CCP. After this you are able to Provision organisations to use applications within the Cloud.
An introduction to CPP was already given here.
Define the Business Partner
First you will have to define a business partner that developed the ISV. This business partner is needed when defining the Application.
- Goto System Organization
- Open Global Business Partners
- Select +-sign
- Fill in the
details
- Click Save
Define the Application
Note: A CCP application is NOT a synonym for a ISV package. An application can encompass several packages and a package can be used for the definition of several applications.
- Goto System Organization
- Open Global ApplicationsClick +-sign
- Fill in the Application details:
Application id: com.ciber.utilityservicesApplication name: CIBER Utility ServicesNote: Within ISV the CIBER Netherlands can be picked
- Click Save
- Now the following Tabs are shown at the bottom
The Roles are used to define all the roles that are available for the application.
The X-forms are used for GUIs that are used during provisioning. Here you can add for example an input GUI each time a new Organisation is provisioned. For example to ask for extra attributes.
The BPMs are used during provisioning.
- Select Roles tab
- Select the first Role as Role Id
Tip: It is advised to put functional roles in a separate ISV package, maybe in a later blog item i will come back to this.
- Fill in further details for the Role
- Click Save
- Do the same for other Roles
Note: When an application is assigned to an Organisation each Role can be used within that Organisation. You have to be aware of this when defining the application. Sometimes you do not want some Organisations to have a certain Role. In that case it is best to define a separate Application.
After that you have to define on which cluster the application runs.
After that you have to define on which cluster the application runs.
- Select
Installed on clusters tab
Click +-sign - Select the Default Cluster
- Click Save
- Click Validate (This is important, because then the state of the application
becomes In use)
- Click Back
- Click Save
Before the application can be used it must be added to a Channel. A Channel in this case is the Global Channel that is defined when installing Provisioning.
Add Application to Default Channel
Add Application to Default Channel
- Select Collection tab
- Open Collection
- Click on +-sign to add an application to this collection
- Within Application id select the com.ciber.utilityservices application
- Click Save
Now you can assign Applications to Organisations.
2011/07/08
Cordys - Designing short lived processes
When designing short lived processes you have to watch out.An example short lived process with several different types of activities.
Within a process you can use several Activities:
- Calling a subprocess within the same package
- Calling a subprocess within another package
- A webservice call:
- A runtime reference webservice call
- A UDDI webservice call
- A webservice call (drag-and-dropped from another package)
Execution
The short lived process is executed within a BPM service container and uses a thread for it. It holds the http connection for this call.
However be aware that the runtime behavior of the 3 activities is different.
- Another BPM process can be executed within the same service container and on the same thread
- Same as 1)
- A webservice call is done through the Bus again and Cordys does not know where the call will be executed eventually. Note that this can be the SAME service container as the one, where the current short lived process is executed. Another thread is needed and eventually (when doing more such webservices calls) the service container may use all threads. This can cause that the client gets a timeout and the next calls cannot be executed.
A way to avoid case 3) is that extra service containers are defined to handle subsequent calls.
For example:
When you have 2 ISV packages that each contain different functionality, you can decide to have separate service containers at runtime. Another advantage is that you can stop the service container of one component without stopping the other service container, so that components can be stopped.
Conclusion
Be aware of the runtime consequences when designing short-lived processes.
2011/06/21
Cordys: The value is not set for the parameter number
Today I ran into the following problem:
<log4j:event logger="com.cordys.xds.internal.transaction.query.XQYQuery" timestamp="1308643015133" level="ERROR" thread="Monitor Stream Reader Thread">
<log4j:message><![CDATA[Failed to execute query. Error: + '
<error
TYPE="Enumeration">
<elem>Error :com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 1.</elem>
</error>
']]></log4j:message>
<log4j:MDC><![CDATA[host=cvzlaca004 processid=1314]]></log4j:MDC>
<log4j:throwable><![CDATA[com.cordys.xds.transaction.exception.DatabaseQueryException: Failed to execute query. Error: + '
<error
TYPE="Enumeration">
<elem>Error :com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 1.</elem>
</error>
'
Trace:
at com.cordys.xds.internal.transaction.query.XQYQuery.executeQuery(XQYQuery.java:221)
at com.cordys.xds.internal.branch.BranchDataCache.prepareParentBranchHierarchy(BranchDataCache.java:325)
at com.cordys.xds.internal.branch.BranchDataCache.loadCacheValueInternal(BranchDataCache.java:134)
at com.eibus.util.cache.Cache.loadCacheValue(Cache.java:375)
at com.eibus.util.cache.Cache.get(Cache.java:264)
at com.cordys.xds.internal.branch.BranchDataCache.get(BranchDataCache.java:217)
at com.cordys.xds.internal.branch.BranchManagerImpl.getBranchDataValue(BranchManagerImpl.java:443)
at com.cordys.xds.internal.branch.BranchManagerImpl.getBranch(BranchManagerImpl.java:421)
at com.cordys.xds.internal.branch.BranchManagerImpl.getBranch(BranchManagerImpl.java:411)
at com.cordys.xds.internal.service.XDSServiceImpl.isValidBranch(XDSServiceImpl.java:353)
at com.cordys.xds.internal.service.XDSServiceImpl.getServer(XDSServiceImpl.java:329)
at com.cordys.task.xds.TaskUtil.createTaskBranch(TaskUtil.java:168)
at com.cordys.applicationconnector.task.TaskConnector.open(TaskConnector.java:56)
at com.eibus.soap.Processor.open(Processor.java:752)
at com.eibus.soap.Processor.startProcessor(Processor.java:1036)
at com.eibus.soap.ProcessStreamsHandler.startProcessor(ProcessStreamsHandler.java:681)
at com.eibus.soap.ProcessStreamsHandler$StreamReader.run(ProcessStreamsHandler.java:353)
]]></log4j:throwable>
<log4j:locationInfo class="com.cordys.xds.util.XDSLogger" method="exception" file="XDSLogger.java" line="242"/>
</log4j:event>
The reason for this problem is that the user did not have enough privilage on the database to execute this query. So Cordys needs to have db_writer, db_reader AND db_owner rights on the database!
It took me half a day to figure this out, so hopefully this helps other Cordys developers !
Abonneren op:
Berichten (Atom)










