quinta-feira, 24 de julho de 2014

webMethods Creating a business process with a task for approval Part 1 expose a web service for a Purchase Order

This is a tutorial on how to create a simple process in webMethods BPM editor. The process will be triggered using the IS as the backend which will publish a document with some new purchase order information.

1. Create a new package: Demo_POApprovalProcess




2. Add the following folder structure including the root folder with the name of the package to avoid namespace conflits.


3. Create a PurchaseOrder document under the folder docs. This is done using the microsft sample available at http://msdn.microsoft.com/en-us/library/bb387012.aspx



4. Set the document as publishable and push it to the broker to synch.


5. Create a service definition (under services) to publish the document to the broker. This service has just the PurchaseOrder document as an input and the a result string for sucess/error feedback. The document is the input of the publish wM service.


6. Now that the service is created the only thing missing is generating the WSDL. We will need to create an alias, but first lets generate a keystore and a key for enhanced security (I really don't like when security is set a side even for tutorial purposes).

  • To generate a keystore java provides the keytool available in any jdk and this includes the one wM uses. Just run the following command and it will generate a keystore with one key included.

C:\SoftwareAG\jvm\jvm170_64\bin>keytool -keystore demokeystore -genkey -alias demoks



You will be prompted for organizational details this would be useful to generate a CA for tutorial purpose this info can be inserted randomly. This will generate a keystore on the bin folder with the name demokeystore.

7. Now that the keystore has been generated we can had it to the Integration Server. Navigate to Security > Keystore > Create Keystore Alias. Insert the password chosen that was used to generate the keystore.

8. Generate a Web Service Provider Endpoint. Navigate to Settings > Web Services and create a new server alias for HTTP. In this case it was named wMlocalhost. Use the ip of the machine you have where the IS is running and a valid port. Include the previous created keystore and key in the WS definitions. The other fields can be left with default definitions.


9. The WSDL can now be generated in the Designer. Just choose the previously created End Point alias, the other setting can be left with default values.



 10. We will test the call of the web service using SOAP UI. Create a new project and had the WSDL address to initial WSDL.



11. Test the WS call using the following SOAP message. Use an account with sufficient privileges for the HTTP authentication security. The expected result is displayed bellow.










Sem comentários:

Enviar um comentário