One key capability in WebCenter PS3 is the ability to create Data Controls and Taskflows at runtime. You can create a data control using SQL or a webservice, and wire this data control into a custom taskflow that can be created at run time which shall use a Mashup Style to render the data control. We could build different data controls and mash them up via taskflows by leveraging the underlying WebCenter schemas.
Let’s build a data control from a webservice and render that on a WebCenter Spaces page.
In this example we will create a simple currency converter task flow, consuming a web service and make a data control out of it. From there we will display it on the Spaces page.
The service url is: http://www.webservicex.net/CurrencyConvertor.asmx?WSDL
Here are the Steps :
1. Logon to your Space as an admin user.
2. From you Space navigate to Manage > All Settings
3. Go to the spaces resource Management tab and navigate to the Data Controls
4. Then create a Data Control by selecting the webservice option. Select Create > Web Service. Provide the details for the data control Name (Currency Converter), Description and provide the WSDL details. Ensure you provide Proxy details as well if needed and click connect.
5. Select the method to be consumed Click Create to finish
6. Click Edit and select the "show" attribute for the Data control to be visible from the Composer/Business Dictionary
7. Create a Taskflow with a Blank Mashup style
8. Edit the task flow by selecting Edit > Edit
9. Select Add Content and Select the Mash-Ups folder
10. Select Data Controls
11. Select Currency Converter
12. Select Add > ADF Button
13. Select Conversion Rate to drill into the Currency Converter Data Control
14. Select the Add > ADF Output Formatted w/Label
15. Select ToCurrency Add > ADF Input Text w/Label
16. Select FromCurrency Add > ADF Input Text w/Label
17. Then select Close
18. Select View and choose Source
19. Select the element InputText: ConversionRate_ToCurrency element and select Edit
20. Change the Input Text Label to “To Currency” then OK
21. Repeat the process again for the FromCurrency InputText element and change the Label to “From Currency” then OK
22. Now select the panelLabelandReturn text element and change the Label to “Exchange rate” then OK
23. Finally select the commandButton and change the Text to “Get Exchange Rate” then OK
24. Select the Box element then select Edit and order the “To Currency” Input text element to the top then OK
25. Save and Close the Task Flow editor
26. Select Edit > Show to display the Task Flow in the Business Catalogue
27. Now we need to create a new page to display this task flow
28. Select Pages > Create Page, name it MashUp select a blank template
29. Select Add Content > Mash-Ups > Task Flows and choose to Add the CurrencyConverterTF task flow to the page.
30. Select Save and Close
31. Run a test and Enter USD in the To Currency field and AUD in the From Currency field and press the Get Exchange Rate button
Gotta love the value of the Australian dollar right now. Time to go shopping :-)
That was a quick tutorial on how to add webservice capabilities to your WebCenter deployment.
Many thanks to Vijaykumar Yenne for his original viewlet.
Cheers
Andrew Rosson
Perth, Western Australia
Thursday, May 19, 2011
Subscribe to:
Post Comments (Atom)
3 comments:
This has really cleared the concept of mashups in webcenter spaces for me. Thank you very much for this blog post.
Great tutorial, thanks much!
ya is really good man
i have one required meant i want to create a task flow in that i two tables when ever i click on one row i want render another table ant idea please.
Post a Comment