How to invoke BPM from JSF

Hi all,

UserInterface is Developed in JSF and Jboss is application server, here need to invoke one of webmethods process model which expect broker document as a receive step, to invoke BPM, how to publish the webmethods broker document to the webmethods- broker from JSF , i think by java-broker API can able to publish the document to webmethods broker , can any one help me on this with sample excerices or with steps and also send me java-broker API. and this Canaonical document need to maintain the correlationID in BPM.

Anil Kumar Ellendula

Hi Anil,

I would write a flow service that takes the document you need to start the process and publishes it using pub.publish:publish.

To call this sevice you could

  • expose it as a webservice and call it this way from your JSF application or
  • use to invoke your service.

Hope that helps.



thanks for reply, i knew the approach you mentioned here, but i donot want to go this approach, my requirement insisting to write code publish document to the broker. i want it can be done java -broker API in JSF
Anil Kumar ellendula

You might be able to set up a JMS queue into the broker and do a JMS publish?

Or you could try invoking a flow service directly via the http invoke url (see Getting the data format correct will take some time but it should work.

The best option is exposing the flow service as a web service. Why is that not an acceptable solution?

You can also write a very simple Java Service using Developer that calls the flow service pub.publish:publish with the incoming doc. After that you can invoke it using the http invoke url technique as posted by kwilliams.

IMO, a Java service would be the wrong thing to do.

An old thread but perhaps the following is still helpful…

I find it odd to view writing code to publish a document to the Broker as a “requirement.” At best it is a design decision that has been made for you. :slight_smile:

As Kevin Williams mentioned, one approach is to use the JMS API along with the Broker as a JMS provider. Another is to use the Broker Java API directly (it’s proprietary). Another is exposing a web service on IS. Yet another is calling an IS service via HTTP get or post (post is probably more appropriate).

If it were me, I’d do plain ol’ XML (POX) over HTTP post.

Hi reamon,

Thanks for reply,
Can able send send the sample java-Broker API to publish the document from JSF.

Anil Kumar Ellendula

The documentation from Software AG has details and examples for using the Broker Java API.