Pages

Showing posts with label Webcenter. Show all posts
Showing posts with label Webcenter. Show all posts

Monday, October 21, 2013

Webcenter Portal Task Flows with Page Service API

In this example i am going to create a webcenter portal task flow using Page Service API.

If you want to create task flow in Webcenter portal, Oracle is providing a standard way go to Administration  -> Under UI components -> Task Flows-> Create(Button)



But you can create a task flow using page service api also.

                pageServiceImpl.createTaskFlow(newTaskFlowPage,
                                               newTaskFlowPageDef,
                                               newTaskFlowDefinition,
                                               srcTaskFlowPage,
                                               srcTaskFlowPageDef,
                                               srcTaskFlowDefinition);


based on this we can create a task flow from existing Task flow template.

First we need to create a .Jsff page, pagedef.xml and taskflow-definition.xml file. Place them in the same folder structure like bellow. 


Then using the about page service api method we can create a task flow.


for this sample we need to add some extra jar files shown below.



you can download the sample project.

 Sample UI screen shots.

Click on the "New TaskFlow" link





Wednesday, October 16, 2013

Webcenter Portal Page Creation with Page Service API

In this example i am going to create a webcenter portal page using Page Service API.

If you want to create new page in Webcenter portal, Oracle is providing a standard way by using "Page - Create Page" Task flow.



Go to Resource Palette -> Webcenter Portal - Service Catalog -> Task Flows ->  Page - Create Page.

Drag this Task flow to the page and provide the taskflow parameters. 

This will give you a standard dialog box, But user don't have any control to modify this.



But, if we create a page using a webcenter portal page service api we can simplify this dialog.

By using this method we can create new pages in the webcenter portal.
page = pageService.createHierarchyPage(parentPagePath, pageNameFormat, pageTitle,pageStyle, pageTemplate, null);
 
You can download the sample code from this link : CustomePageThroughAPI

One main change is we need to provide the hierarchical permissions to the authenticated role.


You can find the sample application Screen shots.






You can view the same page form the Administrator screen.