Human Task Java API

Hi
I have a requirement to create human tasks without using soa. I am trying to use the Human task Java API. Using this API I can do all the operations like updating the outcome, adding/updating comments and updating assignee list but not able to create initial task. I am using initiateTask operation which requires task definition id. I dont know how to set this. Can anybody guide me
1. Can I create human tasks without using composite pure java api?
2. If I am able to create initial task what will be the task definition id? I tried to enter a new row in soa infra meta data table which did not work.
I really appreciate the help.
Thanks

Hi Sri
I have few Processes deployed to my SOA Domain and that too under different Partitions. For ease of maintenance, in EM Console under soa_infra node instead of default partition we can have our own Partitions also to deploy specific workflow projects under those partitions. If you don't have this thats ok.
I looked at Payload data for all the Tasks submitted by the first Initiator Task in EM Console, when we check the Flow Trace etc. Here is what I found for <taskDefinitionId> value for each of my different Processes. They do have some Pattern. So you had to use some sort of properties file to get these values so that if they are deployed to different partitions and with different versions, you do not have to modify your java code and recompile it. Just modify .properties file.
Anyhow, looks like the format for <taskDefinitionId> is something like this:
NameOfPartition + "/" + NameOfProcess + "!" + VersionNumber + "/" + NameOfInitiatorHumanTask
Here are some examples from my domain for some of the Process.
<taskDefinitionId>default/SalesQuoteProcess!1.0/EnterQuote</taskDefinitionId>
<taskDefinitionId>Ravi1_Partition/CreditReviewRequestProcess!1.0/HumanTaskCreditRequestor1</taskDefinitionId>
<taskDefinitionId>Jegga1_Partition/HolidayProcess!1.0/StartNewHolidayTask</taskDefinitionId>
You already tried hardcoding it I guess and it worked. Now try generating them dynamically using simple String appenders and sort of properties file to make it more dynamic. How often do we really change partition name or human task name itself or name of process itself. They are pretty much fixed. Now comes only the Version number. This can change with your new deployment if you want to have different version. So just read all these from .properties file.
Thanks
Ravi Jegga

Similar Messages

  • Human Task Bulk API calls from ADF Entity Object

    Dear all,
    Jdev: 11.1.1.7.1
    We have a requirement where in human task APIs need to be invoked on status changes of an ADF Entity (EO). We presently achieve this in the afterCommit() method and all is well.
    But we are looking to leverage the Human Task bulk update APIs and am wondering how to do that.
    The EO does support a batch mode - Is there a batch mode API that we can override to place the bulk update API call?
    Thanks

    in version 11.1.1.6 getInputStream() and getContent() do not work, this is know bug you can find in the oracle support at
    https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_afrLoop=175895926830291&type=DOCUMENT&id=1451100.1&displayIndex=8&_afrWindowMode=0&_adf.ctrl-state=tlzphlagm_69
    there you can find a .zip file with a full example code.
    Actually Oracle does not consider it a bug:
    "This issue was reviewed by Engineering in Bug 13873092 and is not considered a bug. There is a workaround to retrieve task contents through 'WFTaskUpdate' Servlet as described in the attached Sample project."
    but in my opinion it is a very big bug endeed, and it drove me mad for days! :(
    Anyway here is a snippet with the workaroud in case you do not have access to the oracle support site:
    if att is you attachment and wfContext is your workflow context set somewhere
    AttachmentType att;
    IWorkflowContext wfContext;
    instead of doing this
    InputStream inputStream = att.getInputStream();
    do this
    String contextId = wfContext.getToken();
    String attachmentURL = WFUtils.getTaskUpdateURL(att.getTaskId(), contextId, "" + att.getVersion(),att.getName(),
    Constants.WFTASK_QUERY_ATTACHMENT_BUTTON_KEY_NAME);
    if ( attachmentURL == null ) {
    System.out.println("Unable to generate URL to get attachmentcontent");
    try {
    URL url = new URL(attachmentURL);
    URLConnection conn = url.openConnection();
    InputStream inputStream = conn.getInputStream();
    } catch ( Exception e ) {
    e.printStackTrace();
    hope this helps
    Massi

  • Will BPM Tasks JAVA API work with Weblogic+ Jdeveloper 11.1.1.6.0 ?

    Hi,
    I am working with the JAVA tasks API for working with BPM Human workflows that deals with programmatical interaction with BPM from ADF applications. The same is working fine in ver 11.1.1.4.0.
    My Question is that whether the same will be supported in the upcoming versions (may be 11.1.1.6.0) or do I need to change the approach by programmatically calling webservices provided as an out-of-box feature with my BPM.
    Much Appreicated !
    Regards.

    Hi,
    I am working with the JAVA tasks API for working with BPM Human workflows that deals with programmatical interaction with BPM from ADF applications. The same is working fine in ver 11.1.1.4.0.
    My Question is that whether the same will be supported in the upcoming versions (may be 11.1.1.6.0) or do I need to change the approach by programmatically calling webservices provided as an out-of-box feature with my BPM.
    Much Appreicated !
    Regards.

  • JAVA API of Oracle BPEL, to access the "Task Form"(JSP) of a human task.

    Hi,
    Are there any JAVA API of Oracle BPEL, to access the "Task Form"(JSP) of a human task, to render the task form inside the custom worklist application.
    Thanks,
    Naga

    I guess you mean accessing the task details and the payload from the java API.
    Refer the below blog it will provide you the details
    http://www.albinsblog.com/2012/05/update-human-task-payload-via-java-api.html
    Regards
    Albin I
    Edited by: Albin on Sep 19, 2012 11:24 PM

  • Workflow API: adding and accessing file Attachments to a Human Task

    Hi there,
    I am using the Workflow Services Java API (11.1.1) for SOA Suite to access and manipulate human tasks. I would like to be able to access and add file attachments to existing human tasks. I am using the methods provided in the AttachmentType interface.
    When adding an attachment, the problem I am running into is that an attachment does created and associated with the task, however it is empty and has no content. I have attempted both setting the input stream of the attachment, as well as the content string and in each case have had no success.
    I have successfully added and accessed an attachment using the worklist application, however when trying to access the content of this attachment through code I receive an object with mostly null/0 values throughout, apart from the attachment name.
    As the API's are not overly rich in documentation I may well be using them incorrectly. I would really appreciate any help/suggestions/alternatives in dealing with BPEL task attachments.
    Thanks
    The code I am using resembles:
    List attachments = taskWithAttachments.getAttachment();
    for(Object o : attachments){
    AttachmentType a = (AttachmentType) o;
    String content = a.getContent(); +// NULL+
    InputStream str = a.getInputStream(); +// NULL+
    String name = a.getName(); +// Has the attachment name+
    String mime = a.getMimeType(); +// Has the mime type+
    long size = a.getSize(); +// 0+
    Edited by: 855489 on May 2, 2011 4:23 PM
    Edited by: 855489 on May 2, 2011 8:48 PM

    I am also facing the same issue, using 11.1.1.6, anyone managed to solve this?
    Regards
    Venkat

  • Java.lang.NullPointerException : while editing the human task  JDeveloper

    java.lang.NullPointerException
    o.bpel.services.workflow.verification.impl.TaskContentAccess.getAccess(TaskContentAccess.java:127)
    o.tip.tools.ide.workflow.util.AccessRulesUtil.getDefaultActionAccessData(AccessRulesUtil.java:265)
    o.tip.tools.ide.workflow.util.AccessRulesUtil.getChangedActionAccessData(AccessRulesUtil.java:174)
    o.tip.tools.ide.workflow.editor.tab.TaskActionAccessConfigurationPanel.getData(TaskActionAccessConfigurationPanel.java:272)
    o.tip.tools.ide.workflow.editor.tab.TaskActionAccessConfigurationPanel.initMode(TaskActionAccessConfigurationPanel.java:439)
    o.tip.tools.ide.workflow.editor.tab.TaskAccessConfigurationPanel.initMode(TaskAccessConfigurationPanel.java:147)
    o.tip.tools.ide.workflow.editor.tab.AdvancedOptionsPanel.setData(AdvancedOptionsPanel.java:195)
    o.tip.tools.ide.workflow.editor.tab.AdvancedOptionsEditor.setData(AdvancedOptionsEditor.java:116)
    o.tip.tools.ide.workflow.editor.WorkflowManager.loadIntoUIModel(WorkflowManager.java:218)
    o.tip.tools.ide.workflow.addin.WFTabbedEditor.load(WFTabbedEditor.java:265)
    o.tip.tools.ide.workflow.addin.WFTabbedEditor.access$000(WFTabbedEditor.java:105)
    o.tip.tools.ide.workflow.addin.WFTabbedEditor$1.run(WFTabbedEditor.java:253)
    j.lang.Thread.run(Thread.java:619)

    Getting following error when I try to update Human task from JDeveloper
    Uncaught exception
    java.lang.NullPointerException
    o.bpel.services.workflow.verification.impl.TaskContentAccess.getAccess(TaskContentAccess.java:127)
    o.tip.tools.ide.workflow.util.AccessRulesUtil.getDefaultActionAccessData(AccessRulesUtil.java:265)
    o.tip.tools.ide.workflow.util.AccessRulesUtil.getChangedActionAccessData(AccessRulesUtil.java:174)
    o.tip.tools.ide.workflow.editor.tab.TaskActionAccessConfigurationPanel.getData(TaskActionAccessConfigurationPanel.java:272)
    o.tip.tools.ide.workflow.editor.tab.TaskAccessConfigurationPanel.getActionData(TaskAccessConfigurationPanel.java:103)
    o.tip.tools.ide.workflow.editor.tab.AdvancedOptionsPanel.getData(AdvancedOptionsPanel.java:215)
    o.tip.tools.ide.workflow.editor.tab.AdvancedOptionsEditor$LocalPropertyChangeListener.propertyChange(AdvancedOptionsEditor.java:141)
    j.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
    j.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
    j.a.Component.firePropertyChange(Component.java:8128)
    o.tip.tools.ide.workflow.editor.tab.AssigneesEditor.propertyChange(AssigneesEditor.java:186)
    j.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
    j.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
    j.a.Component.firePropertyChange(Component.java:8128)
    o.tip.tools.ide.workflow.editor.v2.StageEditor.firePropertyChange(StageEditor.java:1488)
    o.tip.tools.ide.workflow.editor.v2.StageEditor.propertyChange(StageEditor.java:1081)
    j.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
    j.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
    j.a.Component.firePropertyChange(Component.java:8128)
    o.tip.tools.ide.workflow.editor.v2.ParticipantEditor.editParticipant(ParticipantEditor.java:1304)
    o.tip.tools.ide.workflow.editor.v2.ParticipantEditor$LocalMouseAdapter.mouseClicked(ParticipantEditor.java:1004)
    j.a.Component.processMouseEvent(Component.java:6266)
    jx.s.JComponent.processMouseEvent(JComponent.java:3267)
    j.a.Component.processEvent(Component.java:6028)
    j.a.Container.processEvent(Container.java:2041)
    j.a.Component.dispatchEventImpl(Component.java:4630)
    j.a.Container.dispatchEventImpl(Container.java:2099)
    j.a.Component.dispatchEvent(Component.java:4460)
    j.a.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
    j.a.LightweightDispatcher.processMouseEvent(Container.java:4247)
    j.a.LightweightDispatcher.dispatchEvent(Container.java:4168)
    j.a.Container.dispatchEventImpl(Container.java:2085)
    j.a.Window.dispatchEventImpl(Window.java:2478)
    j.a.Component.dispatchEvent(Component.java:4460)
    j.a.EventQueue.dispatchEvent(EventQueue.java:599)
    j.a.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    j.a.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    j.a.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    j.a.EventDispatchThread.run(EventDispatchThread.java:122)

  • SOA/BPM/Human Tasks 11g -- add new task participant through Workflow API

    Heya folks. Got a question that's been driving me nuts, hope you can help.
    I have a bunch of Human Tasks in a BPMN process. Each task is pretty simple -- for assignment a single stage only; parallel approval; list of participants is passed in -- via the task payload -- as a comma-delimited list. When the task is initiated it produces a root task, and one child task for each participant. So, say we have participants "fgolfer,atreyvaud" we get three task objects: the "master" or root task and one each for fgolfer and atreyvaud.
    Now what I want to do is add another approver (let's say "gfrog") -- i.e. create a new task for gfrog which is a child of the master task and leaves the tasks for fgolfer and atreyvaud as they are. As far as I can figure, this is NOT a Reassign nor an Ad-Hoc Route. Applying either of those to an existing task effectively removes the existing user from the task and assigns it to the new user.
    On another track, if I programmatically create a new task (with initiateTask() from the Task service, using the values from an existing task), I seem to get a NEW master task with attendant child tasks, while leaving the existing master task and children.
    Make sense? Neither of these outcomes is what I want.
    Seems like this should be pretty simple but for the life of me I can't figure it out. I could create an FYI task or a todo task or a subtask but again this isn't what I want -- need to create a task with all the custom outcomes and such.

    In case folks are playing along at home, I've yet to find a solution for this. Because I need to move forward with my project, I've decided I can't do it through the Workflow API and I'm taking a different route -- basically, triggering a custom task outcome which returns to the same Human Task in the BPMN flow, thus starting the task again. Before doing that I update the task's payload, which contains the task assignees.
    I'm not happy with this, it seems like a nasty hack to overcome a limitation with the Workflow API.
    Understand, though, I'm not saying this is impossible through the Workflow API, just that I haven't found a way to do it. I've spent 2-3 person weeks on this and it's time to move on.

  • How to query Task via instanceId  as argument in Oracle 11g BPM Java API ?

    hi,
    Is any one successful of getting Task Object  with InstanceId as argument using TaskQueryService or InstanceMangementService ? If So please provide the API.
    I am actually looking to assign a task to participant via JAVA api .
    Thanks

    You will have to query the base tables which are
    OE_ORDER_HEADERS_ALL and
    OE_ORDER_LINES_ALL

  • 11g: human task API

    Please, tell me where can I find information about API for using human tasks in external user interface (non ADF). (for example, get list of assigned tasks to user, get assigned tasks information etc)
    P.S. we are using SOA Suite 11g + BPM tier
    Edited by: creed on 13.11.2010 14:33

    The doc set for Fusion Middleware is at: http://download.oracle.com/docs/cd/E14571_01/index.htm
    Documentation for Human Workflow in included in the Fusion Middleware Developer's Guide for Oracle SOA Suite: http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10224/toc.htm
    There's an overview of using the APIs in the section on Building a Custom Work List Client: http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10224/bp_worklistcust.htm#BHAHBHID
    Description of specific Human Workflow Services is at: http://download.oracle.com/docs/cd/E14571_01/integration.1111/e10224/bp_workflow.htm#BACHEFDH
    Hope that helps.

  • How to Java methods after submition of human task

    I want to implement java callbacks after completion of human task.
    My Requirement is : I want to save the process object in my separate table once user has submitted the human task.
    Can any 1 give me the example on that.
    Edited by: 964010 on Jan 9, 2013 2:21 AM

    Hi
    See below post for one approach. Anytime a Task is Submitted (means completed by clicking any Action buttons like Submit, Approve, Reject etc etc), the outcome in the method mentioned below is like OUTCOME_UPDATE. First add some print statements here, then later add your custom code.
    Re: Assign role, group to Human Task when initiated
    Thanks
    Ravi Jegga

  • JAVA API for human intervention in SOA 11g

    Hi all,
    what is the JAVA API that does work for human intervention fault-policies?
    Please help me in finding out this.
    Regards
    PavanKumar.M

    Hi,
    Workflow api
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10660/toc.htm
    Rules api
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10660/toc.htm
    Thanks,
    Raja

  • Is it possible to update the human task payload without using worklist API but only using advance routing rule.

    Hi,
    I have one human tasks in BPEL process in which i am using different stages and with using advance routing rules i am routing my task payload to one stage to another.My payload has Task Status and Branch,after approving the human task from first stage I want to send modified value of the Task Status to the next stage without using worklist API or manual updation but only using the advance routing rules,is it possible ??? If anyone have any idea about this than please enlight me with your valuable solutions and  advices...
    Thanx
    Regards
    Ajral

    Hi SamGoe,
    According to your description, my understanding is that you want to update the PoerPoint slide from SharePoint 2010 slide library automatically.
    It seems to be not necessary to use Macros. SharePoint provides an OOB way to notify you to check for update to the slide library slides when you open the presentation. PowerPoint does this because you selected the option
    Tell me when this slide changes when you copied the slides from the library.
    More information, please refer to the link below:
    http://office.microsoft.com/en-us/powerpoint-help/sharepoint-slide-libraries-ii-use-slides-in-the-library-RZ010254089.aspx?section=6
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Executing Workflow Task through JAVA APIs

    Hi,
    I'm able to send the workflow task to the next step with JAVA APIs.
    The problem comes here if I try to log in into MDM through IConnectorGatewayService.
    If I get a connection to MDM through CatalogData's login method, everything works fine, task is getting executed properly. But, if I try to run the same code where I get the connection through IConnectorGatewayService, the same code doesn't work.
    Surprisingly, there is no problem in retrieving data from MDM while connecting with ConnectorGatewayService.
    Please do let me know if I need to specify some parameters while getting the connection with IConnectorGatewayService so that I can change the workflow task status.
    Thanks and Regards,
    Mausam

    Hi Mausam
    Please go through this document u will get the solution
    https://help.sap.com/javadocs/MDM/current/index.html
    https://help.sap.com/javadocs/MDM/current/index.html
    I think it may help you
    Regards
    Hari

  • Display the status of parallel human tasks in ADF web page (BPM 11g)

    Hi,
    We create a BPMN process (BPM 11g) which splits into parallel branches. Each branch has its own user activity. We want to show the task status of ALL the parallel user activities (running or completed) in the ADF web page implemented for the user activity so the user would have the whole picture of the process.
    In another words, we are able to check the status of the component instances associated with the process instance in the Oracle EM. We want to provide the similar information (in our case, we only want to show the status of the human task components) to the user when they access the human task page.
    I wonder if the only solution is to write Java code with the API to lookup the BPMN process instance. We try to avoid Java coding if possible. Please advise. Also, so far, I have not found any complete instruction/document on how to access the BPMN process instance and check the tasks etc. through the API. Please help if you know where I could get such information.
    Thanks a lot,
    Helen

    sorry!!
    http://www.esnips.com/doc/dca05e99-d5ca-49ce-80c8-5bedfe27a24a/screenshot-2

  • Unable to add Human Task flow to composite

    Hi,
    I'm  learning SOA & building up Purchase Order SOA App.
    My Jdev ver is 11.1.1.6
    While I'm trying to Add a Human Task to Composite I'm getting below error stack.
    Invoking command: delete_namespace_from_adfconfig
    Invoking command: add_namespace_to_adfconfig
    Uncaught exception
    java.lang.NoSuchMethodError: oracle.mds.internal.dt.net.OraMDSDTURLConnection.getInputStream(Loracle/mds/core/MDSSession;)Ljava/io/InputStream;
      o.mds.internal.dt.net.OraMDSDTURLConnection.getInputStream(OraMDSDTURLConnection.java:124)
      j.net.URL.openStream(URL.java:1010)
      o.j2ee.ws.wsdl.xml.WSDLReaderImpl.openAsStreamConnection(WSDLReaderImpl.java:576)
      o.j2ee.ws.wsdl.xml.WSDLReaderImpl.readDocument(WSDLReaderImpl.java:438)
      o.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:377)
      o.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:627)
      o.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:269)
      o.j2ee.ws.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:240)
      o.tip.tools.ide.common.utils.wsdl.WSDLUtil.parseWSDL(WSDLUtil.java:1333)
      o.tip.tools.ide.fabric.model.SCAWSDLManager.loadWSDL(SCAWSDLManager.java:200)
      o.tip.tools.ide.fabric.api.WsdlInfo.readWSDL(WsdlInfo.java:254)
      o.tip.tools.ide.fabric.api.WsdlInfo.getAbstractWsdlLocation(WsdlInfo.java:475)
      o.tip.tools.ide.fabric.api.WsdlInfo.getAbstractWsdlLocation(WsdlInfo.java:466)
      o.tip.tools.ide.fabric.api.SCAControllerInterfaceImpl.addInterface(SCAControllerInterfaceImpl.java:322)
      o.tip.tools.ide.fabric.api.SCAControllerServRefImpl.addServiceInternal(SCAControllerServRefImpl.java:430)
      o.tip.tools.ide.fabric.api.SCAControllerComponentImpl.createComponent(SCAControllerComponentImpl.java:83)
      o.tip.tools.ide.fabric.api.SCAControllerImpl.createComponent(SCAControllerImpl.java:262)
      o.tip.tools.ide.workflow.ide.jdeveloper.JDevWorkflowProject.createComponent(JDevWorkflowProject.java:239)
      o.tip.tools.ide.workflow.ide.jdeveloper.JDevWorkflowProject.handleComponentCreation(JDevWorkflowProject.java:222)
      o.tip.tools.ide.workflow.ide.jdeveloper.JDevWorkflowProject.commit(JDevWorkflowProject.java:196)
      o.tip.tools.ide.workflow.util.CreateWorkflowCommand.doIt(CreateWorkflowCommand.java:75)
      o.tip.tools.ide.workflow.projectwizard.JDevProjectBuilder.createIDEProject(JDevProjectBuilder.java:72)
      o.tip.tools.ide.workflow.projectwizard.WorkflowCreationDialog.createProject(WorkflowCreationDialog.java:116)
      o.tip.tools.ide.workflow.projectwizard.WorkflowCreationDialog$1.run(WorkflowCreationDialog.java:100)
      j.lang.Thread.run(Thread.java:662)
    Please Help me out..!!!
    Thanks in Advance

    Its due to JDeveloper installation or cache issue...
    I uninstalled completely and installed again. I am able to create Human Task now. Maybe it helps someone.
    -Sudheer

Maybe you are looking for