Disruptive technology = > Order of magnitude cheaper , order of magnitude lower quality, order of magnitude lower margin captured by the vendor
Saturday, June 29, 2013
Disruptive technology
Disruptive technology = > Order of magnitude cheaper , order of magnitude lower quality, order of magnitude lower margin captured by the vendor
Sunday, June 16, 2013
How to increase the number of processes allowed in oracle database.
$ sqlplus sys as sysdba;
Enter the passed for sys when prompted.
If your application makes many connections and the number of processes allowed to be created by the oracle db is smaller than that, you will get the error
ORA-12519: TNS:no appropriate service handler found
To solve this issue, first view the number of processes allowed by oracle.
SQL> select * from v$resource_limit where resource_name = 'processes';
If you are using oracle express edition, this value would be 40.
Now increase number of allowed the processes
SQL>alter system set processes=300 scope=spfile;
SQL>shutdown immediate;
SQL>startup
Sunday, June 2, 2013
How to log from within a BPEL process
There are multiple ways to log information from a BPEL process to the server logfile.
One options is to write your own extension activity and use it to log information to the log where necessary. However, there is a simple and easy way to write logs without writing your own extension. That is to use the E4X extension activity.
In order to use E4X extension within your bpel process, follow the following steps.
1. Add xpath 2.0 namespaces to the process definition.
queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
2. Define e4x as an extension.
<bpel:extensions>
<bpel:extension namespace="http://ode.apache.org/extensions/e4x" mustUnderstand="yes"/>
</bpel:extensions>
3. Include the e4x extension operation where you want to log information.
<bpel:assign validate="no" name="AssignE4X">
<bpel:extensionAssignOperation>
<js:snippet xmlns:js="http://ode.apache.org/extensions/e4x">
<![CDATA[ print(“My Log message from bpel process"); ]]>
</js:snippet>
</bpel:extensionAssignOperation>
</bpel:assign>
Thursday, May 2, 2013
How to implement your own task UI on top of WSO2 BPS Human Task Engine
<soapenv:Header/>
<soapenv:Body>
<ns:simpleQuery>
<ns:simpleQueryInput>
<ns1:simpleQueryCategory>ALL_TASKS</ns1:simpleQueryCategory>
</ns:simpleQueryInput>
</ns:simpleQuery>
</soapenv:Body>
</soapenv:Envelope>
This should return a list of currently available tasks.
Now iterate though the task list and use load task method with the task id to load individual tasks.
Use following soap message.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://docs.oasis-open.org/ns/bpel4people/ws-humantask/api/200803">
<soapenv:Header/>
<soapenv:Body>
<ns:loadTask xmlns:ns="http://docs.oasis-open.org/ns/bpel4people/ws-humantask/api/200803">
<ns:identifier>8405</ns:identifier>
</ns:loadTask>
</soapenv:Body>
</soapenv:Envelope>
This would return all information about the given task.
After you have obtained this data, you can use operations such as start, stop , claim, complete ect with the task id and corresponding xml message.
For example, start task request would look like the following.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://docs.oasis-open.org/ns/bpel4people/ws-humantask/api/200803">
<soapenv:Header/>
<soapenv:Body>
<ns:start xmlns:ns="http://docs.oasis-open.org/ns/bpel4people/ws-humantask/api/200803">
<ns:identifier>8405</ns:identifier>
</ns:start>
</soapenv:Body>
</soapenv:Envelope>
Additionally, you can refer to the human task ui jsp pages of BPS to get more details.
https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0/components/business-processes/humantask/org.wso2.carbon.humantask.ui/4.0.5/src/main/resources/web/humantask
Tuesday, April 30, 2013
Developing a Business Process with a Correlation Set Using WSO2 Developer Studio
In the example, we will explore how to use correlation sets to route a message to an existing instance of a business process. We are going to use the simplest possible BPEL process. An Echo Process which will accept the same request message twice. Following is a sequence diagram for the sample use case.
Since the second EchoRequest can either create a new instance of the EchoProcess or be routed to a previously created instance of EchoProcess, we require a correlation set.
CorrelationSet ,Property and property Alias.
A CorrelationSet is some unique set of values contained in the message that will be used by the process engine to select the correct process instance to send the message to. Correlation is done between two or more messages. A CorrelationSet can contain one or more properties.
Once we define a correlation property, we have to define the corresponding values in each of the messages we expect to correlate. These corresponding values are called Property Aliases.
Lets create the process using WSO2 Developer studio
Step1. Create the business process.
Click next and client finish to create the BPEL project.
2. Generate a business process with the synchronous business process template.
3. Drag and drop receive, assign and reply activities such that we will get the following process
4. Click on the Assign activity and assign ‘input’ from input variable to ‘result’ from output variable.
5. Similarly, complete the next receive, assign and reply activity by using the same partner link
‘client’ .Now we have completed the business of the process logic. Now we need to add the correlation set to two receive activities.
6. Create a correlation set by clicking on the ‘+’ sign next to Correlation Sets
7. Select the correlation set and select properties and click on Add.
8. We will get the Select property wizard. Click on New.
9. Give a name to our correlation property.
10. Select the data type for our correlation property. We have selected is here as a ‘Simple Type’. Click Browse. Now we have to select the data type from xml schema types. Select string as our type.
Now a pop up box will appear and asks for the prefix to be used to the xml schema namespace. Give the prefix as ‘xsd’.
11. Click on the new button next to Alias to define property alias.
13. Now we have finished defining the correlation set, property and alias. Note that we have selected only one alias here because, we are using the same message for both receive activities. Now we have to add the correlation set to the receive activities. On the first receive activity, which creates the process instance, we will initialize the correlation set. On the next, receive activity; we do not need to initialize. Click on the receive activity, and go to properties, click add and select the correlation set. Since we have only one correlation set, it will appear. On the initialize section select yes.
On the next correlation activity, set initiation to no.
14. Next, generate the deployment descriptor.
Next select all files related to the project and create a zip package. Upload the bpel package. One the process is deployed successfully; we can use tryit to send a request to the process.
Now browse to instance view for this process. Now the instance has complete up to reply activity and
is waiting on the next receive activity. Under the correlation properties: you can see the value we sent in the request.
14. Now send the same request from tryit again. Now the process instance has gone to the completed instance. You can follow the same steps we used here to add correlation sets to any asynchronous business process you implement. Correlation sets can be added to ‘receive’, ‘invoke’ and ‘pick’ activities.