Wednesday, March 12, 2014

Dynamically generate the end point of an instance in BPEL

There can be a requirement where in you directly wanted to draft the location of an instance so that the end user can track the status of the process.

This requirement comes mainly when you are sending an error notification and then you also attach the end point location of the instance so that user can directly click on the link and check where the error is.

In order to dynamically create the end point for an instance following is the format that has to be used in BPEL

http://<HostName>:<Port>/em/faces/ai/soa/messageFlow?target=/Farm_<DomainName>/<DomainName>/<SOA_Server>/<Partition>/<CompositeName>%20[<Version>]&amp;type=oracle_soa_composite&amp;soaContext=<Partition>/<CompositeName>!<Version>/<InstanceID>

Here you have to take care of few things that BPEL do no take & hence you will have to convert it to &amp;

You can choose one of the process and fill in the detail in this dynamic url first manually to see if this work then you can further modify this to fulfill your requirement.

The different variables which are required at run time can be derived using java embedding

An example is given in the following blog

Using inbuilt functionality such as getCompositeName,getCompositeInstanceID

We can use getCompositeURL to get the version of composite.



No comments: