Oracle® Fusion Applications Developer's Guide 11g Release 7 (11.1.7) Part Number E15524-08 |
|
|
PDF · Mobi · ePub |
This chapter describes what to do if your SOA composite includes a human task, and you need to define an Oracle ADF task flow for a human workflow for users to interact with the task.
When to implement: If your SOA composite includes a human task, then you need to define an Oracle ADF task flow for a human workflow for users to interact with the task.
Design Pattern Summary: If your SOA composite includes a human task, then you need a way for users to interact with the task. The integrated development environment of Oracle SOA Suite includes Oracle Application Development Framework (Oracle ADF) for this purpose. With Oracle ADF, you can design a task display form that depicts the human task in the SOA composite.
Involved components:
Oracle ADF task flow for human tasks
Human task service component
When invoking a human task from a SOA composite, an interface is required so that end users can interact with the task. You can use Oracle ADF to develop an interface that displays the human task within the SOA composite.
This section describes the procedure used to invoke an Oracle ADF task flow for a human task. The procedure includes tasks that are detailed in the following sections:
Implementing an Oracle ADF task flow for a human task involves the following tasks:
Creating an Oracle ADF task flow.
Creating a user interface.
Confirming the classpath, libraries and tag libraries.
Implementing product-specific sections.
Implementing a task detail with contextual area.
Implementing email notification.
Displaying localized translated data.
Displaying rows in the approval task.
Configuring a deployment profile.
Before You Begin:
Ensure that you do the following:
Define your human workflow task definition in SOA workspace. The TASK file definition and schemas are referenced when creating the Oracle ADF task flow for human tasks. The TASK file defines the data controls used in your task detail page.
Define the UI and uiModel project following the directory structure, package structure and naming standards. Although the task detail page is associated with a human task definition in your SOA composite, add to source control the UI project containing the Oracle ADF task flow for human task definition with the Oracle ADF workspace, not the SOA workspace.
If you plan to create other UI and uiModel projects unrelated to Oracle ADF task flow for human tasks, you can create them in the same LBA directory as the UI and uiModel projects associated with an Oracle ADF task flow for human tasks. However, it is recommended to keep the other UI and uiModel projects in separate projects, using the optional <Context>
to differentiate them.
The first step in the use case is to create an Oracle ADF task flow.
To create an Oracle ADF task flow:
Right-click your UI project and choose New.
In the New Gallery window, select Web Tier > JSF > ADF Task Flow Based on Human Task and click OK.
In the SOA Resource Browser dialog, select the TASK file location and target TASK file.
This creates the data control definition.
Create a bounded task flow. From the Create Task Flow dialog, enter a name for the task flow and click OK.
Note:
There is no established task flow file-naming standard.
This creates the task flow containing a View component with the default name taskDetails1_jspx
, as shown in Figure 45-1. Rename the view activity to something meaningful to you.
Double-click the view activity in the task flow. From the Create JSF Page dialog that displays, modify the file name or directory location as needed, and click OK.
When placing a bounded task flow on a JSPX page, make sure to handle exceptions in the bounded task flow. If the exception is propagated to the unbounded task flow, the bounded task flow may exit, causing the JSPX page to behave unpredictably.
Use the template with the ID ExceptionHandlerTaskFlowTemplate
in the JSPX page to avoid any unpredictable behavior. The template is located in the UIComponents-View.jar
, as follows: /oracle/apps/fnd/applcore/patterns/uishell/templates/ExceptionHandlerTaskFlowTemplate.xml
.
Note:
Use the Property Inspector to add the template to the page, as shown in Figure 45-2.
Figure 45-2 Add the Template with the Property Inspector
Use the drop handler template to create a user interface for the human task.
To create a user interface:
Create a task detail UI and navigate to Application Navigator > Data Controls > Task Data Control Name > getTaskDetails > Return > Task.
Drag and drop the task data control to your JSPX page and select Create > Human Task > Complete Task with Payload, as shown in Figure 45-3.
The Edit Action Binding (getTaskDetails
) dialog is displayed.
In the Edit Action Binding (getTaskDetails
) dialog, click OK.
The Edit Action Binding (UpdateActions
) dialog displays, as shown in Figure 45-4.
In the Edit Action Binding (UpdateActions
) dialog, click OK.
In the Source view of the JSPX page, verify that <af:panelHeader> displays as the top most component in the <af:form> component. Figure 45-5 shows the Source view of a sample JSPX page.
Verify that the Applications Core (ViewController) library is included in the UI project class path.
Verify that the following distributed libraries are included in the JSP Tag LIbraries for the project:
Trinidad HTML Components,
Workflow Tags 1.0,
worklistComponents 1.0,
Applications Core (ViewController).
Product-specific sections include the following:
Instructions
Details
Recommended Actions
<PLACE APPLICATION SPECIFIC CONTENT HERE>
Related Links
Comments and Attachments
History
Note:
Do not modify anything in the portion of the template that includes the following:
Title attribute of the of the <af:document>
component
Text attribute of the <af:panelHeader>
component
Toolbar facet of the <af:panelHeader>
component
You can add instructions just before the Details section.
To include instructions in the panelHeader:
Add the component <af:outputText>
before the Details section, as shown in Example 45-1.
Example 45-1 Adding instructions above the Details section
<af:panelGroupLayout layout="vertical" id="pgl3"> <f:facet name="separator"> <af:spacer width="15" height="15" id="s6"/> </f:facet> <af:outputText value="[Instruction text goes here]"/> <af:showDetailHeader size="1" text="#{resources.DETAILS}" shortDesc="#{resources.TASK_HEADER}" disclosed="true" id="sdh1">
The Details section, as shown in Figure 45-6, contains the required human task information displayed in the Approvals, Request for Action, and FYI patterns in the first column and displays optional product-specific header information for the task.
Do not modify the code in the first column, which corresponds to the first <trh:cellFormat>
with id="cf1"
, as shown in Figure 45-6.
Do any or all of the following:
If required, change the text attribute for the <af:showDetailHeader>
component. The default is set to "#{resources.DETAILS}"
, for example, Details.
If your page does not display product-specific information in this section, skip this section and continue to the next section.
If your page displays product-specific information, add it to the third <trh:cellFormat>
component, which corresponds to the <trh:cellFormat>
with id="cf6"
shown in Example 45-2.
Example 45-2 Modify the third <trh:cellFormat> component
<af:showDetailHeader size="1" text="#{resources.DETAILS}" shortDesc="#{resources.TASK_HEADER}" disclosed="true" id="sdh1"> <f:facet name="toolbar"/> <trh:tableLayout width="98%" id="tl1"> <trh:rowLayout id="rl2"> <trh:cellFormat width="50%" valign="top" id="cf1"> ... First column of task-specific fields, do not modify ... </trh:cellFormat> <trh:cellFormat id="cf5"> <af:spacer width="15" height="15" id="s3"/> </trh:cellFormat> <trh:cellFormat width="50%" valign="top" id="cf6"> ... Second column containing product-specific fields ... </trh:cellFormat> </trh:rowLayout> </trh:tableLayout> </af:showDetailHeader>
Note:
Based on the UX specification, the task information displayed in the first column should only be displayed in the first column and should not wrap into the third column.
If your page requires an additional column of product-specific information, take the following steps.
Add a column for spacing, <trh:cellFormat id="cf7">
. Add a column to display the product-specific information, <trh:cellFormat id="cf8">
. Change the width to 33%, for <trh:cellFormat>
components with id="cf1"
, id="cf6"
, and id="cf8"
as shown in Example 45-3.
Example 45-3 Adding product-specific information
<af:showDetailHeader size="1" text="#{resources.DETAILS}" shortDesc="#{resources.TASK_HEADER}" disclosed="true" id="sdh1"> <f:facet name="toolbar"/> <trh:tableLayout width="98%" id="tl1"> <trh:rowLayout id="rl2"> <trh:cellFormat width="33%" valign="top" id="cf1"> ... First column of task-specific fields, do not modify ... </trh:cellFormat> <trh:cellFormat id="cf5"> <af:spacer width="15" height="15" id="s3"/> </trh:cellFormat> <trh:cellFormat width="33%" valign="top" id="cf6"> ... Second column containing product-specific fields ... </trh:cellFormat> <trh:cellFormat id="cf7"> <af:spacer width="15" height="15" id="s3"/> </trh:cellFormat> <trh:cellFormat width="33%" valign="top" id="cf8"> ... Third column containing product-specific fields ... </trh:cellFormat> </trh:rowLayout> </trh:tableLayout> </af:showDetailHeader>
The Recommended Actions section, as shown in Figure 45-7, is used in the Information Only pattern.
The Oracle ADF code for the Recommended Actions <af:showDetailHeader>
component is shown in Example 45-4.
Example 45-4 Code for Recommended Actions
<af:showDetailHeader size="1" id="recommendedActionsHeader" text="#{resources.RECOMMENDED_ACTIONS}" disclosed="true"> <f:facet name="info"/> <f:facet name="legend"/> <f:facet name="menuBar"/> <f:facet name="toolbar"/> <f:facet name="context"/> </af:showDetailHeader>
If your page does not display the Recommended Actions section, remove the <af:showDetailHeader>
component with text="#{resources.RECOMMENDED_ACTIONS}"
and continue to the next section.
If your page does display the Recommended Actions section, add the actions and appropriate links to this section.
Note:
Translation and accessibility standards state that individual words should not be implemented as links.
The <PLACE APPLICATION SPECIFIC CONTENT HERE> section is a place holder for product-specific information such as the Purchasing Line section in the Approval Page Details pattern.
The Oracle ADF code for the <PLACE APPLICATION SPECIFIC CONTENT HERE> <af:showDetailHeader>
component is shown in Example 45-5.
Example 45-5 Oracle ADF code for the application specific content section
<af:showDetailHeader size="1" id="applicationContentHeader" text="<PLACE APPLICATION SPECIFIC CONTENT HERE>" disclosed="true"> <af:panelGroupLayout id="payload_panel" layout="vertical" shortDesc="#{resources.CONTENTS}"> <af:panelFormLayout id="pfl1"> <af:inputText value="#{bindings.PayloadInput1.inputValue}" label="#{bindings.PayloadInput1.hints.label}" required="#{bindings.PayloadInput1.hints.mandatory}" columns="#{bindings.PayloadInput1.hints.displayWidth}" maximumLength="#{bindings.PayloadInput1.hints.precision}" shortDesc="#{bindings.PayloadInput1.hints.tooltip}" id="it3"> <f:validator binding="#{bindings.PayloadInput1.validator}"/> </af:inputText> </af:panelFormLayout> </af:panelGroupLayout> </af:showDetailHeader>
Do any or all of the following:
If your page does not have an application-specific section, then remove the <af:showDetailHeader>
component with text="<PLACE APPLICATION SPECIFIC CONTENT HERE>"
and continue to the next section.
Modify the text attribute of the <af:showDetailHeader>
component.
Modify the body of the <af:showDetailHeader>
component to meet your requirements.
Note:
The Complete Task with Payload drop handler adds an <af:inputText>
component for each of the task payload fields by default. Remove these fields if they are not required.
Add links to the bottom of this section, as shown in the pattern. The link implementation instructions are discussed in Section 45.4.3.5, "How to Implement Links."
If additional product-specific sections are required, add them directly below the <af:showDetailHeader>
section. Ensure that the size of the additional <af:showDetailHeader>
components is set to 1.
Use the af:goLink
component and specify targetFrame="_blank"
to implement the related link.
To construct the target URL, use the API oracle.apps.fnd.applcore.patterns.uishell.context.UIShellContext.getURL
. This API can still be used even though the task detail page does not implement the UI Shell. Enter a non-null webApp
parameter to generate the full URL including the host name and port.
The resulting code should be similar to that displayed in Example 45-6.
Example 45-6 Code that Results from Implementing Links
UIShellContext.getURL(java.lang.String viewId, java.lang.String webApp, java.lang.String pageParametersList, java.lang.String navTaskFlowId, java.lang.String navTaskKeyList, java.lang.String navTaskParametersList, java.lang.String navTaskLabel, FndMethodParameters methodParameters)
The Comments and Attachment sections are used to store comments and attachments associated with the Approval and Request for Action patterns.
Do any of the following:
If your page requires both comments and attachments, then leave it as is and continue to the next section.
If your page does not require any comments or attachments, as in the FYI pattern, remove the <af:switcher>
component with facetName="#{pageFlowScope.bpmClientType}"
and its facets and continue to the next section.
If your page requires the comments section only, move the <af:showDetailHeader>
component with text=#{resources.COMMENTS}
from the switcher facet with name="notificationClient"
so that it is a peer of the switcher with facetName="#{pageFlowScope.bpmClientType}"
. Then delete the <af:switcher>
component with facetName="#{pageFlowScope.bpmClientType}"
and its facets. The resulting code is shown in Example 45-7.
Example 45-7 Modifying comments and attachments
<af:showDetailHeader size="1" id="relatedLinksHeader" text="#{resources.RELATED_LINKS}" disclosed="true"> ... </af:showDetailHeader> <af:showDetailHeader size="1" id="showDetailHeader1" text="#{resources.COMMENTS}" disclosed="true"> ... </af:showDetailHeader> <af:showDetailHeader size="1" id="historyHeader" text="#{resources.HISTORY}" disclosed="false"> ... </af:showDetailHeader>
If you require additional instructions in the Attachments dialog, then add an <af:outputText>
component after <af:outputText>
with value="#{resources.UPLOAD_FILE_CAVEAT}"
, as shown in Example 45-8.
Example 45-8 Adding additional instructions to the Attachments dialog
<af:popup id="popupAddAttachmentDialog"> <af:dialog title="#{resources.ADD_ATTACHMENT}" okVisible="false" cancelVisible="false" closeIconVisible="false" id="d2"> ... <af:panelGroupLayout id="pgl10"> <f:facet name="separator"> <af:spacer width="15" height="15" id="s2"/> </f:facet> <af:outputText value="#{resources.UPLOAD_FILE_CAVEAT}" id="ot10"/> ... Add additional instructions here ... <af:panelFormLayout id="pfl2"> <af:selectOneRadio label="#{resources.ATTACH_TYPE}" value="#{readAttachmentBean.selectedAttachmentType}" valueChangeListener="#{readAttachmentBean.toggle}" autoSubmit="true" id="editAttachmentType" layout="horizontal" immediate="true"> ... </af:afdialog> </af:popup>
The Related Links section is used in the Information Only pattern.
Example 45-9 shows the Oracle ADF code for the Related Links <af:showDetailHeader>
component.
Example 45-9 Modifying Related Links
<af:showDetailHeader size="1" id="relatedLinksHeader" text="#{resources.RELATED_LINKS}" disclosed="true"> <f:facet name="info"/> <f:facet name="legend"/> <f:facet name="menuBar"/> <f:facet name="toolbar"/> <f:facet name="context"/> </af:showDetailHeader>
If your page does not display the Related Links section, then remove the <af:showDetailHeader>
component with text="#{resources.RELATED_LINKS}"
and continue to the next section.
If your page displays the Related Links section, add the appropriate links to this section. The link implementation instructions are described in Section 45.4.3.5, "How to Implement Links."
The History section displays the tabular and graphical displays of the task history.
Do any of the following:
If your page requires the history section, then leave it as is.
If your page does not require the history section, remove the <af:showDetailHeader>
component and its facets and child components, as shown in Example 45-10.
Example 45-10 Modifying task history
<af:showDetailHeader size="1" id="historyHeader" text="#{resources.HISTORY}" disclosed="false"> <f:facet name="info"/> <f:facet name="legend"/> <f:facet name="menuBar"/> <f:facet name="toolbar"/> <f:facet name="context"/> <af:panelGroupLayout layout="vertical" id="pgl7"> <wlc:taskHistory initParam="#{aleComponentBean.comp}" showTabularView="true" showGraphicalView="true" id="th1"/> </af:panelGroupLayout> </af:showDetailHeader>
If you are implementing a task detail page with a contextual area, do not use the UIShellMainArea
template when creating the JSF page. Instead, create the JSF page without a template.
Use <trh:tableLayout>
, <trh:rowLayout>
and <trh:cellFormat>
to configure the layout of the local and contextual areas. For the local area, follow the steps outlined in the following sections:
The email version of the task details are often called notifications, task notifications or email notifications. Email notifications are viewed in email clients.
The goal in implementing the email version of the task detail page is to use the same Oracle ADF task flow for human tasks definition for both the online and email versions. As both versions are nearly identical, you can implement both as a single page to avoid dual maintenance.
Ensure that the TASK file is configured so that email notifications are actionable and task attachments are added to the email as email attachment, as shown in Figure 45-8.
Select an implementation approach from the following:
If the JSPX page that you defined for your online version contains only the following supported components, then you can use your existing JSPX page for both online and email versions.
af:column
af:commandLink
af:document
af:goLink
af:image
af:inputText
af:inputComboBoxListOfValues
af:inputDate
af:inputListOfValues
af:inputNumberSlider
af:inputNumberSpinbox
af:inputRangeSlider
af:outputText
af:panelHeader
af:panelLabelAndMessage
af:selectOneChoice
af:showDetailHeader (excludes helpTopicId
attribute for instructions)
af:table
trh:tableLayout
trh:rowLayout
trh:cellFormat
af:panelFormLayout
af:panelGroupLayout
af:panelList
af:spacer
If the online version of your JSPX page includes many interactions to be made available in the email notification, then you will need to build a second JSPX page for your email notification.
Use an If component in the JSPX page to ensure that only supported components are rendered in the email version. For more information, see Section 45.4.5.3, "Using an If Component."
Introduce an If component in your JSPX page when you have components that are not supported in the email notification.
To use an If component in your JSPX page:
Move the unsupported components in the <f:facet>
with name="online".
Add alternative rendering logic using the supported components in <f:facet>
where name="notificationClient"
, as shown in Example 45-11.
Example 45-11 Using an If component
<af:if defaultFacet="online" facetName="#{pageFlowScope.bpmClientType}"> <f:facet name="online"> ... Place code rendered in online version here ... </f:facet> <f:facet name="notificationClient"> ... Place code rendered in email version here ... </f:facet> </af:if>
If it is not a notificationClient
, the value of bpmClientType
is null. Continue to Section 45.4.5.5, "Fine-Tuning the Emailable Page."
You can enable separate views for online and email versions for notifications.
To enable separate views for online and email notifications:
In the task flow, add a View Activity for the email version.
Add a new view to the task flow definition and rename it appropriately.
Define a control flow from the newly introduced view to the existing task flow return activity called taskReturn.
Modify the transition value to closeTaskFlow.
Add a router.
Add a new router activity and rename it appropriately.
In the property inspector, set the default Outcome
attribute to online
.
Add two cases, as shown in Example 45-12.
Define a control flow case from the newly introduced router to the view associated with the online version. For the transition value, specify online
.
Define a control flow case from the newly introduced router to the view associated with the email version. For the transition value, specify email
.
Set the newly introduced router as the default activity, as shown in Figure 45-9.
To correctly render your JSPX page in email mode, you may need to take any or all of following steps to fine-tune the email page.
Use an <af:outputText>
component to render the instruction text, as there is no style class for instruction text based on the helpTopicId
of <af:panelHeader>
or <af:showDetailHeader>
.
In the <af:showDetailHeader>
component, if the disclose property is set to false, the disclosure is closed in the page to be emailed.
Add an EL expression to the disclosed
property so that the property is true when in email mode, as shown in Example 45-13.
Test your page to determine whether the width of <af:table>
is acceptable. If the table is not wide enough, set the <af:column>
width attribute.
If you are adding product-specific code to the template, ensure that your product-specific code adheres to the localization standards for Oracle ADF user interfaces. For more information, see the chapter "Internationalizing and Localizing Pages" in the Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.
If you are displaying a task payload attribute in your JSPX page, you must override the EL expression for the label attribute for each of the payload attributes. For example, in the automatically generated Oracle ADF code shown in Example 45-14, replace the "#{bindings.PayloadInput1.hints.label}"
so that it refers to translated text in the Xliff resource bundle associated with your UI project.
Example 45-14 Label attributes for the payload
<af:inputText value="#{bindings.PayloadInput1.inputValue}" label="#{bindings.PayloadInput1.hints.label}" required="#{bindings.PayloadInput1.hints.mandatory}" columns="#{bindings.PayloadInput1.hints.displayWidth}" maximumLength="#{bindings.PayloadInput1.hints.precision}" shortDesc="#{bindings.PayloadInput1.hints.tooltip}" id="it1"> <f:validator binding="#{bindings.PayloadInput1.validator}"/> </af:inputText>
Note:
Two strings in the Oracle ADF code template that store their translations in the resource bundle associated with the TASK file (as opposed to the UI project). Do not define the translations in the resource bundle associated with your UI.
Title: Define the title in the task definition using the Translation setting. Ensure a translation is provided in a Java resource bundle. Do not use the properties file to store translated text.
Custom actions: Ensure a translation is provided in a Java resource bundle. Do not use the properties file to store translated text.
For more information about translation resource bundles, see the section entitled "How to set up Resource Bundles for Translation of Your Customizations" in Chapter 62, "Creating Customizable Applications."
If you want to display the rows in the business object that are included in the approval task, use the collection target data in the task data control to determine the rows to be included. Render that information within your product-specific regions.
To use a collection target:
In Oracle JDeveloper, select Application Navigator > Data Controls > Task Flow Name > getTaskDetails(String, String, String) > Return > Task > System Attributes > Collection Target.
Regardless of whether aggregation is enabled, the collection target contains information on the rows that are being approved or rejected by the approver.
Create a deployment profile as you would for any other Oracle ADF UI project. For more information about configuring a deployment profile, see the section entitled "How to Create Deployment Profiles for Standalone WebLogic Server Deployment" in Chapter 3, "Setting Up Your JDeveloper Application Workspace and Projects."
To configure a deployment profile:
Generate an Oracle ADF library for your UI project containing the Oracle ADF task flow for a human task definition.
Add the Oracle ADF library to the SuperWeb project.
Open the web.xml
file for the SuperWeb project and add the code shown in Example 45-15.
Example 45-15 Adding the Oracle ADF library to the SuperWeb project
<filter> <filter-name>WorkflowFilter</filter-name> <filter-class> oracle.bpel.services.workflow.client.worklist.util.WorkflowFilter </filter-class> </filter> <filter-mapping> <filter-name>WorkflowFilter</filter-name> <url-pattern>/faces/*</url-pattern> </filter-mapping> <servlet> <servlet-name>IntegrateTaskFlowWithTask</servlet-name> <servlet-class> oracle.bpel.services.workflow.client.worklist.servlet. IntegrateTaskFlowWithTask </servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet> <servlet-name>secureNotificationServlet</servlet-name> <servlet-class> oracle.bpel.services.workflow.client.worklist.servlet.SecureNotificationS ervlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>IntegrateTaskFlowWithTask</servlet-name> <url-pattern>/integratetaskflowwithtask</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>secureNotificationServlet</servlet-name> <url-pattern>/notification/secure</url-pattern> </servlet-mapping> <context-param> <param-name>oracle.adf.view.rich.security.FRAME_BUSTING</param-name> <param-value>differentDomain</param-value> </context-param>
Under the default source location, create the hwtaskflow.xml
file and merge all the notification task flow details. For example, if you are adding a new ADF task flow for a human task to a project defined in a workspace called fusionapps/fin/components/Payables.jws
, then you would take the following steps.
In the SuperWeb project of your workspace, manually edit the hwtaskflow.xml
file. In this example, the hwtaskflow.xml
file is located in the following directory: fusionapps/fin/components/payables/PayablesSuperWeb/adfmsrc/hwtaskflow.xml
.
Under the <hwTaskFlows>
element, add the relevant <hwTaskFlow>
elements, as shown in Example 45-16.
Example 45-16 Add the <hwTaskFlow> elements
<?xml version = '1.0' encoding = 'UTF-8'?> <hwTaskFlows xmlns="http://xmlns.oracle.com/bpel/workflow/hwTaskFlowProperties"> <ApplicationName>worklist</ApplicationName> <LookupType>LOCAL</LookupType> <TaskFlowDeploy>false</TaskFlowDeploy> <SoaServer> <ejbProviderUrl/> <aliasKeyName/> <keyName/> <connectionName/> </SoaServer> <TaskFlowServer> <hostName/> <httpPort/> <httpsPort/> </TaskFlowServer> <hwTaskFlow> <WorkflowName>FinExmReimToEmpByDepositFyi</WorkflowName> <TaskDefinitionNamespace>http://xmlns.oracle.com/apps/financials/components/ payablesSoa/exm/workflow/reimbursementComposite/ FinExmWorkflowReimbursementComposite/FinExmReimToEmpByDepositFyi </TaskDefinitionNamespace> <TaskFlowId>FinExmReimToEmpByDepositFyiTaskFlow</TaskFlowId> <TaskFlowFileName>WEB-INF/oracle/apps/financials/expenses/workflow/ui/ reimToEmpByDepositTask/flow/FinExmReimToEmpByDepositFyiTaskFlow.xml </TaskFlowFileName> </hwTaskFlow> <hwTaskFlow> <WorkflowName>FinExmReimToEmpByCheckFyi</WorkflowName> <TaskDefinitionNamespace>http://xmlns.oracle.com/apps/financials/components/ payablesSoa/exm/workflow/reimbursementComposite/ FinExmWorkflowReimbursementComposite/FinExmReimToEmpByCheckFyi </TaskDefinitionNamespace> <TaskFlowId>FinExmReimToEmpByCheckFyiTaskFlow</TaskFlowId> <TaskFlowFileName>WEB-INF/oracle/apps/financials/expenses/workflow/ui/ reimToEmpByCheckTask/flow/FinExmReimToEmpByCheckFyiTaskFlow.xml </TaskFlowFileName> </hwTaskFlow> <!-- Add new <hwTaskFlow> elements here. !--> <hwTaskFlow> ... </hwTaskFlow> </hwTaskFlows>
To secure this pattern, follow the instructions described in Chapter 51, "Securing Web Services Use Cases."
You may want to implement the following security tasks:
Secure task flows (bounded)
Secure page fragments
Secure actions
Verifying the deployment involves defining JNDI and foreign JNDI for the non-SOA Oracle WebLogic Server, as well as defining a grant for bpm-services.jar
.
In this use case, the Oracle ADF task flow for human tasks is deployed to a non-SOA server as described here, including configuring foreign JNDI providers. Alternatively, you can define a connection to the Oracle SOA Suite server using a deployment script. For more information about using a deployment script to define a connection to the SOA server, see the section describing the workflow client configuration file (wf_client_config.xml
) in the chapter "Introduction to Human Workflow Services" in the Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.
If you want to deploy the Oracle ADF task flow for human task to a SOA server, deploy your application as described in the chapter "Deploying SOA Composite Applications" in Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.
To verify the deployment:
Deploy the oracle.soa.workflow
shared library to the non-SOA Oracle WebLogic Server.
Navigate to http://remote_hostname:remote_port/console
, where remote_hostname and remote_port are the host name and port for the remote non-SOA WebLogic server.
Select Deployments and click Install.
In the Path field, make sure the following value is specified.
<jdev_install>/fmwtools/fmwtools_home/jdeveloper/ soa/modules/oracle.soa.workflow_11.1.1
Select oracle.soa.workflow.jar
and click Finish.
Confirm that the oracle.soa.workflow(11.1.1,11.1.1)
library is active.
Define the foreign JNDI on the non-SOA Oracle WebLogic Server.
Navigate to http://remote_hostname:remote_port/console
, where remote_hostname and remote_port are the host name and port for the remote non-SOA WebLogic server.
Navigate to Domain Structure > Services > Foreign JNDI Providers and click New.
Enter the name ForeignJNDIProvider-SOA
, and click OK.
Click ForeignJNDIProvider-SOA.
Press Enter and then click Save.
Fill in the following for the SOA Oracle WebLogic Server.
Initial Context Factory: weblogic.jndi.WLInitialContextFactory
Provider URL: Enter the URL of the soa-infra
application, using the following format: t3://
SOA_hostname:SOA_port/soa-infra
User/Password: Enter an administrator username and password for the server.
Note:
The provider URL refers to the soa-infra
application, not the domain. Do not change soa-infra
.
Define the JNDI links on the non-SOA Oracle WebLogic Server.
Navigate to http://remote_hostname:remote_port/console
, where remote_hostname and remote_port are the host name and port for the remote non-SOA Oracle WebLogic Server.
Navigate to Domain Structure > Services > Foreign JNDI Providers and click ForeignJNDIProvider-SOA.
Select the Link tab and click New.
Press Enter and click OK. Enter the following values:
Name: RuntimeConfigService
Local JNDI Name: RuntimeConfigService
Remote JNDI Name: RuntimeConfigService
Specify ejb/bpel/services/workflow/
for ejb/bpel/services/workflow/TaskServiceBean
and ejb/bpel/services/workflow/TaskMetadataServiceBean
only.
Repeat steps c and d for the following JNDI values:
Name/Local JNDI Name/Remote JNDI Name: ejb/bpel/services/workflow/TaskServiceBean
Name/Local JNDI Name/Remote JNDI Name: ejb/bpel/services/workflow/TaskMetadataServiceBean
Name/Local JNDI Name/Remote JNDI Name: TaskReportServiceBean
Name/Local JNDI Name/Remote JNDI Name: TaskEvidenceServiceBean
Name/Local JNDI Name/Remote JNDI Name: TaskQueryService
Name/Local JNDI Name/Remote JNDI Name: UserMetadataService
On the remote non-SOA Oracle WebLogic Server, change jazn-data.xml
(not system-jazn-data.xml
) to include the grant for bpm-services.jar
, as shown in Example 45-17.
Example 45-17 Grant for bpm-services.jar
<grant> <grantee> <codesource> <url>file:${oracle.home}/soa/modules/oracle.soa.workflow_11.1.1/-</url> </codesource> </grantee> <permissions> <permission> <class>oracle.security.jps.JpsPermission</class> <name>VerificationService.createInternalWorkflowContext</name> </permission> <permission> <class>oracle.security.jps.service.credstore. CredentialAccessPermission</class> <name>context=SYSTEM,mapName=BPM-CRYPTO,keyName=BPM-CRYPTO</name> <actions>read,write</actions> </permission> <permission> <class>oracle.security.jps.JpsPermission</class> <name>IdentityAssertion</name> <actions>*</actions> </permission> </permissions> </grant>
Restart the remote non-SOA Oracle WebLogic Server.
Deploy your application containing the human task detail UI to the remote non-SOA Oracle WebLogic Server.
Tips:
When accessing the task in the Oracle Business Process Management Worklist, you may get the following message: "Details not available for this task."
If so, take the following steps:
Check the WFTASKDISPLAY
table in the SOAINFRA
schema for entries corresponding to the tasks. The entries should have the host and port number of the non-SOA Oracle WebLogic Server where the task detail page definitions are deployed.
If there are no entries, check the log files for errors when deploying your task detail pages. Make sure that the grant for the bpm-services.jar
is correctly defined.
Following are some steps you can take to fix known issues.
Specify oracle.soa.workflow.wc
in weblogic-application.xml
.
Set the FRAME_BUSTING
attribute in web.xml.
Migrate from an earlier version of the drop handler template.
Override the EL for the create button.
By default, the drop handler generates a reference to the oracle.soa.workflow
shared library in weblogic-application.xml
. Override the entry in the weblogic-application.xml
file so that it references oracle.soa.workflow.wc
instead.
Example 45-18 shows a snippet of a sample weblogic-application.xml
file with the correct reference to oracle.soa.workflow.wc
.
Example 45-18 Reference oracle.soa.workflow.wc
<?xml version = '1.0' encoding = 'US-ASCII'?> <weblogic-application xmlns:xsi="http://www.w3.org/2001/XMLSchema- instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic- application http://www.bea.com/ns/weblogic/weblogic- application/1.0/weblogic-application.xsd" xmlns="http://www.bea.com/ns/weblogic/weblogic-application"> ... <library-ref> <library-name>oracle.soa.workflow.wc</library-name> </library-ref> ... </weblogic-application>
If you receive a warning message about frame content not loading, modify web.xml
to include the code shown in Example 45-19.
Example 45-19 Set the FRAME_BUSTING attribute in web.xml
<context-param> <param-name>oracle.adf.view.rich.security.FRAME_BUSTING</param-name> <param-value>differentDomain</param-value> </context-param>
If your SOA runtime and task detail UI are running on different domains during development, set the value to never
for testing purposes only.
If your page is created using an earlier version of the drop handler template (which used fnd:applicationPanel
and af:panelStretchLayout
), take the following steps to migrate fnd:applicationsPanel
to af:panelHeader
.
To migrate from an earlier version of the drop handler template:
Open your JSPX page and, in the Structure pane, locate af:panelStretchLayout
under af:form
.
When you have found af:panelStretchLayout
, add af:panelHeader
above af:panelStretchLayout
and set the text attribute to text="#{binding.title.inputValue}"
.
In fnd:applicationsPanel
, find the actionButtonBar
facet and select the af:toolbar
below it.
Move af:toolbar
under the toolbar facet of af:panelHeader
added in the previous step.
Under the content facet of fnd:applicationsPanel
, find af:panelGroupLayout
and move it under af:panelHeader
.
Find af:panelStretchLayout
and delete it.
Save and test your work.
Override shortDesc
EL for the Create button in the Comments section:
To override the EL for the Create button:
In the JSPX page, locate <af:commandImageLink>
and find the action property value #{popupBean.showCommentDialog}
.
For <af:table>
, overwrite the shortDesc
property value as follows: shortDesc="#{resources.CREATE}"
.
Repeat step 2 for the second <af:commandImageLink>
with the action property value #{popupBean.showCommentDialog}
. Example 45-20 shows a sample illustrating <af:commandImageLink>
after modifying the action property value.
Example 45-20 Modifying the action property value for <af:commandImageLink>
<af:commandImageLink id="adCmtBt" partialSubmit="true" actionListener="#{bindings.CreateInsert.execute}" action="#{popupBean.showCommentDialog}" shortDesc="#{resources.CREATE}" hoverIcon="/hw_images/new_ovr.png" visible="#{actionAvailable.isCommentUpdatable}" icon="/hw_images/new_ena.png" disabledIcon="/hw_images/new_dis.png" depressedIcon="/hw_images/new_dwn.png"/>