Tuesday Sep 01, 2009

Task Detail page sample for 11g

I've come across many customers who want to customize the HW detail page for their own. In this post, I'll attach the very basic page u can use, so you don't have to start it from scratch.

sample jsp as below:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">

<%@ page contentType="text/html;charset=EUC-KR"%>

<%@ page import="java.util.*,oracle.bpel.services.workflow.client.IWorkflowServiceClientConstants,com.oracle.jay.WorklistClient,oracle.bpel.services.workflow.client.IWorkflowServiceClient, oracle.bpel.services.workflow.verification.IWorkflowContext,oracle.bpel.services.workflow.client.WorkflowServiceClientFactory,oracle.bpel.services.workflow.query.ITaskQueryService,oracle.bpel.services.workflow.task.model.Task"%>

<html>

  <head>

    <meta http-equiv="Content-Type" content="text/html; charset=EUC-KR"/>

    <title>taskdetailtest</title>

  </head>

  <body>

    <%

    

    String bpmWorklistTaskId = request.getParameter("bpmWorklistTaskId");

    String bpmWorklistContext = request.getParameter("bpmWorklistContext");

    

Map<IWorkflowServiceClientConstants.CONNECTION_PROPERTY,java.lang.String>

properties = new

HashMap<IWorkflowServiceClientConstants.CONNECTION_PROPERTY,java.lang.String>();


properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.MODE, IWorkflowServiceClientConstants.MODE_DYNAMIC);


properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_PROVIDER_URL, "t3://localhost:8001");


properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_CREDENTIALS, "welcome1");


properties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_SECURITY_PRINCIPAL, "weblogic");


IWorkflowServiceClient client = WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.REMOTE_CLIENT, properties, null);


IWorkflowServiceClient wfSvcClient =

WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.SOAP_CLIENT,

properties, null);


    //IWorkflowServiceClient wfSvcClient = WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.JAVA_CLIENT);

    IWorkflowContext ctx = null;

    ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();

    ctx = querySvc.getWorkflowContext(bpmWorklistContext);

    

    Task humanTask = querySvc.getTaskDetailsById(ctx, bpmWorklistTaskId);

    

    out.println("<br>Task Number: " + humanTask.getSystemAttributes().getTaskNumber());

    out.println("<br>Task Id: " + humanTask.getSystemAttributes().getTaskId());

    out.println("<br>Title: " + humanTask.getTitle());

    out.println("<br>Pri ority: " + humanTask.getPriority());

    out.println("<br>State: " + humanTask.getSystemAttributes().getState());

    out.println();

  %>

  </body>

</html>


once you are done with the page, you have to change the url link that redirect to the detailed page when you click on the worklist application.

go to em first, right click on soa-infra, drill into service-engines and Human Workflow. 

snap040.jpg


click the HumanTask and then,


snap041.jpg


change the URI to point the page u made before. 
Good Luck!

[Read More]
About

Solution & Technology Architect, Asia Pacific

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today