Fetching Tasks Using UWL API

Hello Experts,
  Currently we are in the process of retrieving the task items assigned to the logged in User in Portal...We are using UWL API for the same. The problem is that when we create a task through the my Tasks Link in Collaboration, the created task is not getting retrieved.
Please let us know what could be the reason for this....
Regards
Kris

What was the resolution for your issue?
I am also using the UWL API to retrieve items.  When I clear the UWL cache, the API reports 0 items even if I have some, however, if I load the UWL page, the API starts to report the correct number of UWL items.  I have tried the functions getItems() and refreshCacheAndGetItems(), but neither seem to work after clearing the UWL cache.

Similar Messages

  • Developing mobile application (SAP Ui5) using UWL API

    Hi,
    I need to develop a mobile application using sap ui 5 which will fetch the work items from the logged in user's id and when the user clicks on the workitem another custom page should open which will have the details of the task selected.The entire applications needs to be accessed from a smart phone.
    Basically I will be using a hybrid web container for this purpose.
    Do you have sample code or informtaion in this regard.
    Thanks,
    Ranjan.

    Please see Kenichi Unnai in his blog "How to use UWL API for NetWeaver BPM Tasks"
    How to use UWL API for NetWeaver BPM Tasks
    The .sca-file can be found on the sap service marketplace, afterwards you need to import the .sca-file, add the SC to your "MyComponents" and then you can select your necessary DC's.

  • Need help in developing a webdynpro application using UWL API

    Hi developers,
    Iam developing a new WebDynpro application for UWL using UWL API.the functionality is to dispaly the summary of UWL like number of unread items, total items.
    Iam getting the problem while deploying the application, iam getting warning while deployed the application.
    I have given all possible ways mentioned in the below forum link
    Re: Accessing PortalRuntime at runtime?
    The exact problem is coming at reference file.
    Please giude me how to move forward.
    1. Below is the error when given "tckmcbc.uwl~api" in the service entry
    deployed with warning :
    Finished with warnings: development
    Caught exception during application startup from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Error occurred while starting application local/UWLCountDemo and wait. Reason: Clusterwide exception: server ID 21763550:com.sap.engine.services.deploy.container.DeploymentException: Clusterwide exception: Failed to prepare application local/UWLCountDemo for startup. Reason=Clusterwide exception: Failed to start dependent service ''tckmcbc.uwl~api'' of application ''local/UWLCountDemo''. Status of dependent component: STATUS_MISSING. Hint: Is the component deployed correctly on the engine?
    2.Below is the error  when i gave PORTAL:sap.com/tckmcbc.uwl~api in the sharing refernce entry
    Finished with warnings: development
    Caught exception during application startup from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Error occurred while starting application local/UWLCountDemo and wait. Reason: Clusterwide exception: server ID 21763550:com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Application local/UWLCountDemo cannot be started. Reason: it has hard reference to resource tckmcbc.uwl~api with type application, which is not active on the server.
    Thanks in Advance
    Sekhar.
    Edited by: sekhar c on Mar 21, 2009 11:24 AM

    Please see Kenichi Unnai in his blog "How to use UWL API for NetWeaver BPM Tasks"
    How to use UWL API for NetWeaver BPM Tasks
    The .sca-file can be found on the sap service marketplace, afterwards you need to import the .sca-file, add the SC to your "MyComponents" and then you can select your necessary DC's.

  • Use UWL API in a Servet and access the servlet via URL

    Hi All,
    Actually I want to write a servlet from which I will access the uwl items using UWL APIs. And then I will submit HTTP Request to this servlet via url and want to get the UWL items in response. Is it Possible. I know that it is possible to access uwl items from JSPDynpage but is it possible to use it via servlet. If possible please give me some idea. what are the prerequisite.
    Thanks and Regards
    Avijit

    Hello,
    I see your thread is still unanswered, were you able to resolve the problem yourself (if so can you share with others who may have the same problem)? If so can you add anymore details which may help someone else to find an answer?  Or is it ok to mark this post as assumed answered?
    Beth Maben
    EP - Senior Support Consultant II
    SAP Active Global Support
    Global Support Centre Ireland
    **SDN Forum Moderator:
    SAP Enterprise Portal: Application Integration
    **SDN Universal Worklist Wiki:
    http://wiki.sdn.sap.com/wiki/x/ehU

  • Forwarding tasks using UWL

    Hello,
    We are working with EP7 SP13.
    We have problems when we try to forward tasks using the UWL. From main page (without opening the task), we can forward it clicking on the forward button (it displays a new window asking the user ID).
    However, if we open the task and try to forward it, when we click on the forward button, the action does not take effect (it does not display another window asking the user ID).
    We have created new xml configuration files for these tasks, setting their features.
    We have reviewed our xml files but we do not appreciate any error. Where is the problem?
    Thanks in advance,
    Samantha.

    Hi Sumit,
    This is our customized configuration file:
    <UWLConfiguration version="1.0">
      <DescriptionBundles>
        <DescriptionBundle name="corporation_name" default="Actualizar"/>
      </DescriptionBundles>
      <Actions>
        <Action name="viewContent" groupAction="no" handler="UrlLauncher" referenceBundle="view_content" returnToDetailViewAllowed="yes" launchInNewWindow="yes">
          <Properties>
            <Property name="openInNewWindow" value="true"/>
            <Property name="url" value="${item.executionUrl}"/>
          </Properties>
        </Action>
      </Actions>
      <ItemTypes>
        <ItemType name="uwl.task" connector="*" defaultView="DefaultView" defaultAction="viewDetail" executionMode="default">
          <Actions>
            <Action reference="uwlTaskWizard"/>
            <Action reference="priorityLow"/>
            <Action reference="priorityNormal"/>
            <Action reference="priorityHigh"/>
            <Action reference="priorityVeryHigh"/>
            <Action reference="cancelSubprocess"/>
            <Action reference="viewSubProcess"/>
          </Actions>
        </ItemType>
        <ItemType name="uwl.task.webflow.decision.SWF.TS90008264.system_alias" connector="WebFlowConnector" defaultView="webflowView" defaultAction="viewDetail" executionMode="pessimistic">
          <ItemTypeCriteria systemId="system_alias" externalType="TS90008264" connector="WebFlowConnector"/>
        </ItemType>
        <ItemType name="uwl.task.webflow.decision.SWF.TS90008271.system_alias" connector="WebFlowConnector" defaultView="webflowView" defaultAction="viewDetail" executionMode="pessimistic">
          <ItemTypeCriteria systemId="system_alias" externalType="TS90008271" connector="WebFlowConnector"/>
        </ItemType>
        <ItemType name="uwl.task.webflow.decision.SWF.TS90008272.system_alias" connector="WebFlowConnector" defaultView="webflowView" defaultAction="viewDetail" executionMode="pessimistic">
          <ItemTypeCriteria systemId="system_alias" externalType="TS90008272" connector="WebFlowConnector"/>
        </ItemType>
        <ItemType name="uwl.task.webflow.decision.TS00008267.system_alias" connector="WebFlowConnector" defaultView="webflowView" defaultAction="viewDetail" executionMode="pessimistic">
          <ItemTypeCriteria systemId="system_alias" externalType="TS00008267" connector="WebFlowConnector"/>
          <CustomAttributes>
            <CustomAttributeSource id="UM" objectIdHolder="creatorId" objectType="user" cacheValidity="0">
              <Attribute name="firstName" type="string" displayName="First Name"/>
              <Attribute name="lastName" type="string" displayName="Last Name"/>
            </CustomAttributeSource>
          </CustomAttributes>
          <Actions>
            <Action name="viewContent" groupAction="no" handler="UrlLauncher" referenceBundle="corporation_name" returnToDetailViewAllowed="yes" launchInNewWindow="yes">
              <Properties>
                <Property name="openInNewWindow" value="true"/>
                <Property name="url" value="${item.executionUrl}"/>
              </Properties>
            </Action>
          </Actions>
        </ItemType>
        <ItemType name="uwl.task.webflow.decision.TS48907952.system_alias" connector="WebFlowConnector" defaultView="webflowView" defaultAction="viewDetail" executionMode="pessimistic">
          <ItemTypeCriteria systemId="system_alias" externalType="TS48907952" connector="WebFlowConnector"/>
          <CustomAttributes>
            <CustomAttributeSource id="ABAP_BOR" objectIdHolder="externalObjectId" objectType="WFTS" cacheValidity="final">
              <Attribute name="approvby" type="string" displayName="approvby"/>
              <Attribute name="createdate" type="date" displayName="createdate"/>
            </CustomAttributeSource>
          </CustomAttributes>
          <Actions>
            <Action name="viewContent" groupAction="no" handler="UrlLauncher" referenceBundle="corporation_name" returnToDetailViewAllowed="yes" launchInNewWindow="yes">
              <Properties>
                <Property name="openInNewWindow" value="true"/>
                <Property name="url" value="${item.executionUrl}"/>
              </Properties>
            </Action>
          </Actions>
        </ItemType>
        <ItemType name="uwl.task.webflow.decision.TS90007968.system_alias" connector="WebFlowConnector" defaultView="webflowView" defaultAction="viewDetail" executionMode="pessimistic">
          <ItemTypeCriteria systemId="system_alias" externalType="TS90007968" connector="WebFlowConnector"/>
          <CustomAttributes>
            <CustomAttributeSource id="WEBFLOW_CONTAINER" objectIdHolder="externalId" objectType="WebflowContainer" cacheValidity="final">
              <Attribute name="pruContainerWF" type="string" displayName="WF pruContainerWF"/>
            </CustomAttributeSource>
          </CustomAttributes>
          <Actions>
            <Action name="viewContent" groupAction="no" handler="UrlLauncher" referenceBundle="corporation_name" returnToDetailViewAllowed="yes" launchInNewWindow="yes">
              <Properties>
                <Property name="openInNewWindow" value="true"/>
                <Property name="url" value="${item.executionUrl}"/>
              </Properties>
            </Action>
          </Actions>
        </ItemType>
      </ItemTypes>
      <Views>
        <View name="DefaultView" selectionMode="SINGLESELECT" width="98%" supportedItemTypes="uwl.task.webflow.decision.TS90008300.system_alias, uwl.task.webflow.decision.TS90008305.system_alias, uwl.task.webflow.decision.TS90008299.system_alias, uwl.task.webflow.decision.TS90008248.system_alias, uwl.task.webflow.decision.TS90008304.system_alias, uwl.task.webflow.decision.TS90008157.system_alias, uwl.task.webflow.decision.TS90008301.system_alias, uwl.task.webflow.decision.TS90008294.system_alias, uwl.task.webflow.decision.TS90008488.system_alias, uwl.task.webflow.decision.TS90008264.system_alias, uwl.task.webflow.decision.TS90008272.system_alias, uwl.task.webflow.decision.TS90008303.system_alias, uwl.task.webflow.decision.TS90008286.system_alias, uwl.task.webflow.decision.TS90008297.system_alias, uwl.task.webflow.decision.TS90008273.system_alias, uwl.task.webflow.decision.TS90008275.system_alias, uwl.task.webflow.decision.TS90008292.system_alias, uwl.task.webflow.decision.TS90008295.system_alias, uwl.task.webflow.decision.SWF, uwl.task.webflow.decision.TS90008283.system_alias, uwl.task.webflow.decision.TS90008302.system_alias, uwl.task.webflow.decision.TS90008288.system_alias, uwl.task.webflow.decision.TS90008147.system_alias, uwl.task.webflow.decision.TS90008165.SAP_RRHH, uwl.task.webflow.decision.TS90008277.system_alias, uwl.task.webflow.decision.TS90008287.system_alias, uwl.task.webflow.decision.TS48907952.system_alias, uwl.task.webflow.decision.TS90008281.system_alias, uwl.task.webflow.decision.TS90008293.system_alias, uwl.task.webflow.decision.TS90008278.system_alias, uwl.task.webflow.decision.TS00008267.system_alias, uwl.task.webflow.decision.TS90008282.system_alias, uwl.task.webflow.decision.TS90008298.system_alias, uwl.task.webflow.decision.TS90008279.system_alias, uwl.task.webflow.decision.TS90008280.system_alias, uwl.task.webflow.decision.TS90008329.system_alias, uwl.task.webflow.decision.TS90008276.system_alias, uwl.task.webflow.decision.TS90007968.system_alias, uwl.task.webflow.decision.TS90008155.system_alias, uwl.task.webflow.decision.TS90008274.system_alias, uwl.task.webflow.decision.TS90008296.system_alias, uwl.task.webflow.decision.TS90008271.system_alias" columnOrder="statusIcon, attachmentCount, subject, dueDate, priority, creatorId, createdDate" sortby="dueDate:ascend, createdDate:descend" tableDesign="STANDARD" visibleRowCount="10" headerVisible="yes" queryRange="undefined" tableNavigationFooterVisible="yes" tableNavigationType="CUSTOMNAV" actionRef="" refresh="300" dueDateSevere="86400000" dueDateWarning="259200000" emphasizedItems="unread" displayOnlyDefinedAttributes="yes" dynamicCreationAllowed="yes" actionPosition="top" referenceBundle="tasks">
          <DisplayAttributes>
            <DisplayAttribute name="CAMPO1" type="string" width="" sortable="yes" format="medium" hAlign="LEFT" vAlign="BASELINE" maxTextWidth="0" headerVisible="yes">
              <Descriptions default="CAMPO1">
                <ShortDescriptions>
                  <Description Language="es" Description="STATUS"/>
                  <Description Language="en" Description="STATUS"/>
                </ShortDescriptions>
              </Descriptions>
            </DisplayAttribute>
            <DisplayAttribute name="subject" type="link" width="" sortable="yes" format="default" actionRef="viewDetail" referenceBundle="subject" hAlign="LEFT" vAlign="BASELINE" maxTextWidth="0" headerVisible="yes"/>
            <DisplayAttribute name="priority" type="user" width="10" sortable="yes" format="default" referenceBundle="priority" hAlign="LEFT" vAlign="BASELINE" maxTextWidth="0" headerVisible="yes">
              <Menu>
                <MenuItem name="Low" actionRef="priorityLow" referenceBundle="menu_priority_low"/>
                <MenuItem name="Normal" actionRef="priorityNormal" referenceBundle="menu_priority_normal"/>
                <MenuItem name="High" actionRef="priorityHigh" referenceBundle="menu_priority_high"/>
                <MenuItem name="VeryHigh" actionRef="priorityVeryHigh"/>
              </Menu>
            </DisplayAttribute>
          </DisplayAttributes>
          <Actions>
            <Action reference="refresh"/>
          </Actions>
        </View>
      </Views>
      <GlobalDisplayAttributes>
        <DisplayAttribute name="attachmentCount" type="user" width="" sortable="yes" format="default" referenceBundle="attachments" hAlign="CENTER" vAlign="BASELINE" maxTextWidth="0" headerVisible="no"/>
      </GlobalDisplayAttributes>
    </UWLConfiguration>
    Regards,
    Samantha.

  • Create new schedule task using OIM API

    Hello,
    Steps for setting up eclipse :
    1)Create a new JAVA project.
    2)Right click on your newly created JAVA project & select properties.
    3)In Properties window select JavaBuildPath & select libraries tab.
    4)Click on AddExternalJar's button & add jar files from lib,ext folders of OIM client installation.
    5)Click OK.
    CODE<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<package oimscheduler;
    import java.util.HashMap;
    import java.util.Hashtable;
    import javax.naming.Context;
    import Thor.API.Operations.tcUserOperationsIntf;
    import Thor.API.Exceptions.tcAPIException;
    import Thor.API.Exceptions.tcChallengeNotSetException;
    import Thor.API.Exceptions.tcLoginAttemptsExceededException;
    import Thor.API.Exceptions.tcPasswordResetAttemptsExceededException;
    import Thor.API.Exceptions.tcUserAccountDisabledException;
    import Thor.API.Exceptions.tcUserAccountInvalidException;
    import Thor.API.Exceptions.tcUserAlreadyLoggedInException;
    import Thor.API.tcUtilityFactory;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    import com.thortech.xl.util.config.ConfigurationClient;
    public class Scheduler extends SchedulerBaseTask
         tcUtilityFactory ioUtilityFactory = null;
         @Override
         protected void execute()
              try
                   System.out.println("Executing Scheduler.....");
                   createConnection();
                   createUser();
                   System.out.println("Back In execute fn !!!");
              catch(Exception e)
                   System.out.println("Error In execute : "+e.toString());
         public void createConnection()
              try
                   System.setProperty("XL.HomeDir","D:\\Oracle\\OIM\\xellerate");
                   System.setProperty("java.security.policy","D:\\Oracle\\OIM\\xellerate\\config\\xl.policy");
                   System.setProperty("java.security.auth.login.config","D:\\Oracle\\OIM\\xellerate\\config\\authwl.conf");
                   System.setProperty("java.naming.provider.url","t3://localhost:7001 ");
                   System.out.println("Setting Configurations .....");
                   System.out.println("Starting .....");
                   ConfigurationClient.ComplexSetting config =
                   ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
                   System.out.println("Login...");
                   Hashtable env = config.getAllSettings();
                   env.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
                   env.put("java.naming.provider.url","t3://localhost:7001");
                   ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","abcd1234");
              catch(tcAPIException ae)
                   System.out.println("Error In createConnection:tcAPIException "+ae.toString());
              catch(tcChallengeNotSetException cnse)
                   System.out.println("Error In createConnection:tcChallengeNotSetException "+cnse.toString());
              catch(tcLoginAttemptsExceededException laee)
                   System.out.println("Error In createConnection:tcLoginAttemptsExceededException "+laee.toString());
              catch(tcPasswordResetAttemptsExceededException praee)
                   System.out.println("Error In createConnection:tcPasswordResetAttemptsExceededException "+praee.toString());
    catch(tcUserAccountDisabledException uade)
         System.out.println("Error In createConnection:tcUserAccountDisabledException "+uade.toString());
    catch(tcUserAccountInvalidException uaie)
         System.out.println("Error In createConnection:tcUserAccountInvalidException "+uaie.toString());
    catch(tcUserAlreadyLoggedInException uale)
         System.out.println("Error In createConnection:tcUserAlreadyLoggedInException "+uale.toString());
              catch(Exception e)
                   System.out.println("Error In createConnection:Exception "+e.toString());
         public void createUser()
              System.out.println("<<< In createUser Fn >>>");
              try
                   tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
                   HashMap user = new HashMap();
                   user.put("Users.User ID","OIM-API-SCH");
                   user.put("Users.First Name","Oracle-SCH");
                   user.put("Users.Middle Name","JAVA-SCH");
                   user.put("Users.Last Name","SUN-SCH");
                   user.put("Organizations.Key","1");
                   user.put("Users.Role","Full-Time");
                   user.put("Users.Xellerate Type","End-User");
                   user.put("Users.Password","password");
                   long l = moUserUtility.createUser(user);
                   System.out.println("CreatingUser Done.....");
              catch(tcAPIException ae)
                   System.out.println("Error In createUser:tcAPIException "+ae.toString());
              catch(Exception e)
                   System.out.println("Error In createUser:Exception "+e.toString());
    After writing above code ,we have to create jar file.
    Steps To Be Follwed In OIM Design Console
    1)Copy jar file in ScheduleTask folder of your OIM server installation.
    2)Expand administration tree & select TaskScheduler.
    3)Create new task & in class name textfield we have to mention package.classname & mention appropriate values in other textfields & execute it.
    4)Check output.

    We need to override 2 methods while extending from SchedulerBaseTask i.e
    init() :- this method is run before execute by the scheduler .
    execute() :- is executed by the scheduler.
    Revised code :-
    package oimscheduler;
    import java.util.HashMap;
    import Thor.API.Operations.tcUserOperationsIntf;
    import Thor.API.Exceptions.tcAPIException;
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    public class Scheduler extends SchedulerBaseTask
         tcUserOperationsIntf moUserUtility = null;
         @Override
         public void init()
              try
                   System.out.println("In Init");
                   moUserUtility = (tcUserOperationsIntf) this.getUtility("Thor.API.Operations.tcUserOperationsIntf");
              catch (tcAPIException e)
                   e.printStackTrace();
         protected void execute()
              try
                   System.out.println("Executing Scheduler.....");
                   createUser();
                   System.out.println("Back In execute fn !!!");
              catch(Exception e)
                   System.out.println("Error In execute : "+e.toString());
         public void createUser()
              System.out.println("<<< In createUser Fn >>>");
              try
                   HashMap user = new HashMap();
                   user.put("Users.User ID","OIM-API-SCH1");
                   user.put("Users.First Name","Oracle-SCH1");
                   user.put("Users.Middle Name","JAVA-SCH1");
                   user.put("Users.Last Name","SUN-SCH1");
                   user.put("Organizations.Key","1");
                   user.put("Users.Role","Full-Time");
                   user.put("Users.Xellerate Type","End-User");
                   user.put("Users.Password","password");
                   long l = moUserUtility.createUser(user);
                   System.out.println("CreatingUser Done.....");
              catch(tcAPIException ae)
                   System.out.println("Error In createUser:tcAPIException "+ae.toString());
              catch(Exception e)
                   System.out.println("Error In createUser:Exception "+e.toString());
    Edited by: Rahul Shah on Jul 11, 2011 4:16 AM

  • [Worklist API] Failed to fetch task list

    Hello Guys,
    I am trying to fetch tasks using worklist API but it doesnt work for me..It returns the Task list whcih has 0 (zero) tasks. Below is the code i am using:
    Hashtable props = getBpelProperties();
    Locator locator = new Locator("default","welcome1",props);
    IWorklistService Worklist = (IWorklistService)locator.lookupService(IWorklistService.SERVICE_NAME);
    ITask[] Tasks = null;
    try { 
    System.out.println("Obtaining List");
    Tasks = Worklist.listTasksByAssignee("oc4jadmin");
    // I dont find any task in the collection Tasks but i can see the tasks that have been assigned to oc4jadmin using oracle worklist application
    System.out.println("Tasks:"+Tasks.length);
    System.out.println("Got List");
    } catch (ServerException e) {
    System.out.println("Error : "+e.getMessage());
    catch (Exception ex) {
    System.out.println("Error : "+ex.getMessage());
    Can anyone help me please?
    Message was edited by:
    mchagani
    Message was edited by:
    afz

    With regard to your first approach that causes the java.lang.NoSuchMethodError exception, that one is probably caused by the classpath settings.
    The piece of code from the other thread works with the following classpath in JDeveloper 10.1.3.3 and SOA Suite 10.1.3.3:
    bpm-infra.jar, bpm-services.jar, orabpel-common.jar, orabpel.jar (all from the SOA Suite server), Oracle SOAP library, Oracle XML Parser v2 library, Commons Logging 1.0.3 library, JAX-RPC Client library, and the correct wf_client.config.xml, wf_config.xml, is_config.xml files.
    In that piece of code the Apache Commons logging framework is used for logging, not log4j. There are some known issues with the logging jar's included in the BPEL libraries and custom code.

  • Need help in using a API

    I am new to flash . And my doubt may seem very trivial. I hae
    a problem using the Flash administation API "getLiveStreams()" . I
    am supposed to get the list of all live streams. However in the
    client when i do
    nc.call("getLivestreams",responder); i don't get any return
    value . Do i need to set any variables before calling this ? or how
    should i parse the output after calling the function. Any inputs
    would be highly appreciated

    Please see Kenichi Unnai in his blog "How to use UWL API for NetWeaver BPM Tasks"
    How to use UWL API for NetWeaver BPM Tasks
    The .sca-file can be found on the sap service marketplace, afterwards you need to import the .sca-file, add the SC to your "MyComponents" and then you can select your necessary DC's.

  • Not receiving all tasks in UWL (IUWLItemManager)

    I'm creating an stand-alone application for the UWL (so you don't have to use the portal), and I followed this blog:
    /people/kenichi.unnai/blog/2009/10/19/how-to-use-uwl-api-for-netweaver-bpm-tasks
    My problem is that I'm not receiving all my tasks with the IUWLItemManager, I only get some old completed tasks!
    I already took a look at the uwl API link provided, but I couldn't find anything.
    Does anyone have any idea why I'm having this problem?
    Thanks in advance!
    Lynne
    ps I'm using NWDS CE 7.11

    I was able to solve my question myself:
    using the method
                   QueryResult result = itemManager.getItemsForItemType(uwlContext,ItemType.UWL_ITEM_TASK, null, null);
    I get the tasks I was looking for. The other method seems to only give back a selection of items (allready completed etc.)

  • How to delete ad hoc workflow tasks in UWL centrally?

    Hi,
    While we were testing UWL function of Enterprise Portal in Netweaver 7.0, number of users created ad hoc workflow tasks in UWL.  We have recently decided to use Universal Worklist for Inbox-based workflow only (WebFlowConnector) and not to use it for ad hoc workflow (AdHocWorkflowConnector).
    Instead of asking all users to go in to UWL and delete all their ad hoc workflow tasks, I (as a System Administrator) like to delete all ad hoc workflow tasks myself, centrally.  Is this possible?  Does anyone know how to delete all ad hoc workflow tasks centrally?
    Thank you.
    Joon,

    Hi Joon,
    I think it will be really difficult to achieve what you want as each task is related to a particular user.
    I am not sure @ a Sysadmin can accessing other users' tasks.
    You can try looking for some way by using UWL apis.
    I think you can get all your user's adhoc tasks in an ItemCollection object by using append method of Itemcollection Interface and then see that deleting this object may achieve give u desired reults.
    Also try having a look at the IUWLItemManager interface.
    You will find these interfaces in com.sap.netweaver.bc.uwl
    See [here|https://help.sap.com/javadocs/NW04S/current/uw/index.html]
    I hope it helps.
    Regards,
    Sumit

  • SSL: Connection reset by peer ; Failed to enable crypto error while calling the report using bing API with SOAP client

    Hi,
    I am trying to fetch report using bing API and making a SOAP call for fetching the data. I get the following error:
    [Warning] fopen(): SSL: Connection reset by peer [file] /var/www/sites/psmedia/perfectstormmedia/tools/class/msn_api.class.php [line] 780
    02-04-2015 10:17:41 (BST) : [Warning] fopen(): Failed to enable crypto [file] /var/www/sites/psmedia/perfectstormmedia/tools/class/msn_api.class.php [line] 780
    02-04-2015 10:17:41 (BST) : [Warning] fopen(https://download.api.bingads.microsoft.com/ReportDownload/Download.aspx?q=rzr63XFt5qJduddohoIRyOYAP%2f1%2ftsnhk8L%2bzBmUpdU2CQlcUB98RpY%2bbOaLFFGMqAC4IUUadC%2fNdNnJqeVCY%2f%2bpy6noVsVA%2fMJp47a3Xb1VjABfKhcdKy6vqpgEdcQg%2fQZ7QcEpZ3bEloJjUtGpDquFk53BnkeHEPVWZkDYcsQegRz%2fpG4t4w6gKCCRmhArd6osr6ZU9CMJ3lbxtGXjcQEMPvP2apNyr9P%2fc8niyfWA2aBcm1aEmOLX2KL3aRJ4rz9N7gG7uBslVZH%2b4rUjHdB7CMkbb%2fHyHwvPTqGPbPCHnicefr%2b%2fDP70hlkBEGfyOOswK67%2bl1zh7CyIv%2bcMlaDsuDX1HeFf4uORfD41H1z7):
    failed to open stream: operation failed [file] /var/www/sites/psmedia/perfectstormmedia/tools/class/msn_api.class.php [line] 780
    Whenever I execute my script. Can you please let me know what we can do to solve this issue. The version of PHP we are using is 5.3.3 with open ssl. 

    Hi Shobha,
    I can't confirm what version of PHP you are using, but to err on the side of caution please use the version specified in the sample/SDK:
    PHP 5.4.14 has been installed from PHP.
    Here is our code examples:
    https://msdn.microsoft.com/en-US/library/bing-ads-overview-getting-started-php-with-web-services.aspx
    Thanks,
    Itai

  • UWL API in Netweaver CE 7.11

    Hey,
    I'm trying to create a webdynpro (DC) application that displays the UWL. I found a tutorial on this (Accessing UWL Notifications from Web Dynpro Using UWL API), but it's for NW 7.0 and I can't seem to get it running.
    Does anybody have any idea if it is possible in CE 7.11 ? And which DC's you should use for the development?
    The package I am missing is : com.sap.netweaver.bc.uwl

    Hi
    Components : EPBC,EPBC2,EPPSERV and UWLJWF fall under EP Core, so it says that you have EP Core installed.
    check it through
    http://hostname:port/utl/UsageTypeinfo or sysinfo
    Patches available for  UWLJWF component. If you search for a sapnote using UWLJWF and SPnn depending on your patch level.
    Best Regards
    Satish Kumar

  • UWL tasks using API

    Hi all,
    I am trying to create UWL tasks from webdynpro using the UWL API. but i am not able to do so.
    I am using the below code for it.
    IPushChannel push = uwlService.getPushChannel();
    IProviderConnector connectors[] = uwlService.getRegisteredProviderConnectors();
    int thisConnector = 0;
    for(int j=0; j<connectors.length; j++){
    x.reportSuccess(connectors[j].toString());
    if(connectors[j].getId().equalsIgnoreCase(IProviderConnector.WEBFLOW_CONNECTOR_ID))
    thisConnector = j;
    if(thisConnector > 0) {
    Item item =new Item(
    IProviderConnector.WEBFLOW_CONNECTOR_ID,
    "USER.R3_DATASOURCE.INABBEPSKA",""+new Date().getTime(),
    "USER.R3_DATASOURCE.INABBEPSKA "
    item.setDescription("This describes a task created at "+new Date().getTime());
    item.setUser("USER.R3_DATASOURCE.INABBEPSKA");
    item.setSubject("This was generated at "+ new Date().getTime());
    item.setItemType(ItemType.UWL_ITEM_TASK_EXECUTABLE);
    item.setCreatedDate(new Date());
    item.setDueDate(new Date());
    item.setCreatorId("USER.R3_DATASOURCE.INABBEPSKA");
    item.setStatus(StatusEnum.NEW);
    item.setExternalObjectId("2");
    // item.setExternalType("AdHocTask");
    Set users = new HashSet();
    users.add("USER.R3_DATASOURCE.INABBEPSKA ");
    push.pushSharedItem(
    connectorsthisConnector,
    item,
    users
    } catch (Exception e) {
    x.reportSuccess(e.toString());
    Where am i going wrong!!!!!!!!!!
    the tasks are not being created in UWL iview.
    Regards,
    Sudheer.

    Hi Sudheer,
    I have used the below code to create a task in the UWL, u can try with this code,
    try
              IUser creator = null;
                         IWDClientUser clientUser  =  WDClientUser.getCurrentUser();
                         sapUser = clientUser.getSAPUser();
              creator = sapUser;
              IJWFPortalService service =     (IJWFPortalService) PortalRuntime.getRuntimeResources().getService(IJWFPortalService.KEY);
              IWorkflow eWF = service.getWorkflowEngineJMS();
              Hashtable taskCtxt = new Hashtable();
              taskCtxt.put("_wftemplatename_","QuickTask");
              taskCtxt.put("_wfdescription_","Description of the Task");
              taskCtxt.put("_wftaskassignees_","sapuserid of the assignee");
              taskCtxt.put("_wfdueasap_", "ASAP");
              Hashtable appCtxt = new Hashtable();
              appCtxt.put("mysystem", "SAP_LocalSystem");
              appCtxt.put("mylaunchcontext", "uwl");
              appCtxt.put("myappcontext", "test");
              eWF.createTask("Title of the Task",creator,taskCtxt,null);
         catch (Exception e)
              wdComponentAPI.getMessageManager().reportSuccess(e.toString());
    Regards,
    Kalaivani

  • BPM API fetching Tasks (7.3)

    Hi All,
    based on this documentation: http://help.sap.com/saphelp_nw73/helpdata/en/79/d505324ef8429489979e43b76b56a9/content.htm i tried to fetch all active tasks for the currently logged in user, but the result is always a empty list. I found the following thread which is nearly facing the same problem: UWL api doesn't seem to see items ,but i dont know how to configure the system alias or if its even the fault of the alias.
    Are there any other important steps to execute for using the new BPM API? What could be missing in the configuration?
    Best Regards
    Michael

    Hi,
    at the moment my web.xml looks like this (based on http://www.urz.uni-heidelberg.de/saphelp/helpdata/DE/34/96c041a2236a24e10000000a1550b0/frameset.htm):
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         id="WebApp_ID" version="2.5">
         <display-name>LocalDevelopment~d253_test_web~demo.sap.com</display-name>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>default.html</welcome-file>
              <welcome-file>default.htm</welcome-file>
              <welcome-file>default.jsp</welcome-file>
         </welcome-file-list>
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>Protected Area</web-resource-name>
                   <url-pattern>/*</url-pattern>
              </web-resource-collection>
              <auth-constraint>
                   <role-name>bdadmin</role-name>
                   <role-name>SAP_BPM_SuperAdmin</role-name>
                   <role-name>administrators</role-name>
              </auth-constraint>
         </security-constraint>
         <login-config>
              <auth-method>BASIC</auth-method>
         </login-config>
         <security-role>
            <role-name>bdadmin</role-name>
        </security-role>
    </web-app>
    and my web-j2ee-engine.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-j2ee-engine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="web-j2ee-engine.xsd">
         <spec-version>2.4</spec-version>
         <security-role-map>
              <role-name>bdadmin</role-name>
              <server-role-name>SAP_BPM_SuperAdmin</server-role-name>
              <server-role-name>administrators</server-role-name>
         </security-role-map>
         <login-module-configuration>
              <login-module-stack>
                   <login-module>
                        <login-module-name>BasicPasswordLoginModule</login-module-name>
                        <flag>SUFFICIENT</flag>
                   </login-module>
              </login-module-stack>
         </login-module-configuration>
    </web-j2ee-engine>
    If i call my index.jsp i get a little popup window where i can put my username and password in, but then it gets stuck. The http-request is loading endless and on serverside the responsible thread got a infinite loop - resulting in a server restart.
    Can someone provide me a working example of these xml files?

  • Using the UWL API inside a Web Service

    I wrote a Web Service to get the number of new tasks and the total number of tasks for a user like it is displayed in the UWL in the DefaultView.
    The numbers are retrieved by the following code:
    user = com.sap.security.api.UMFactory.getAuthenticator().getLoggedInUser();
    // JNDI lookup for getting the service because we are not in the PRT container
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sapportals.portal.prt.registry.PortalRegistryFactory");
    InitialContext initialContext = new InitialContext(env);
    uwlService = (IUWLService) initialContext.lookup("/broker/services/" + IUWLService.ALIAS_KEY);
    if (uwlService == null) {
         throw new Exception("Cannot get UWL Service");
    context = new UWLContext();
    if (user == null) {
         throw new Exception("No user");
    context.setUser(user);
    context.setLocale(user.getLocale());
    session = uwlService.beginSession(context, 200);
    context.setSession(session);
    context.setAllowBackEndConnections(true);
    itemManager = uwlService.getItemManager(context);
    UWLView view = uwlService.getViewManager(context).getView("DefaultView", context);
    if (view != null) {
         QueryProperties properties = new QueryProperties();
         properties.setMaxNumberOfItemsToFetch(0);
         QueryResult result = itemManager.getItemsForView(context, view, properties, null);
         totals = itemManager.getTotalAndEmphasizedItemCountForView(context, view, "", null);
    In the first step I chose basic authentication. When debugging I see that the web service gets the information about the logged on user. The UWLService, item manager, session and view, all of them are determined resp. created.
    But when calling getItems the UWL exception "Logged in users context or session doesn't exist" is thrown.
    When calling the same functionality from Web Dynpro everything works fine.
    Service and session are determined like this
    uwlService = (IUWLService) WDPortalUtils.getServiceReference(IUWLService.ALIAS_KEY);
    context = new UWLContext();
    IUser user = WDClientUser.getLoggedInClientUser().getSAPUser();
    wdContext.currentUIStateElement().setUserName(user.getFirstName() + " " + user.getLastName());
    context.setUser(user);
    context.setLocale(WDResourceHandler.getCurrentSessionLocale());
    session = uwlService.getUwlSessionForWebDynproClient(context);
    Does anyone know how to work with the UWL API in a web service context?
    Thanks in advance
    Antje

    Hi Experts,
    We are also facing the same issue as of Yomesh.
    The strange part here is that, yesterday, the code was fetching the User and we were able to run the whole web service.
    Suddenly, this doesnt seems to be working today. And after debugging, we found that, the User is not being returned with the below code:
    user = UMFactory.getAuthenticator().getLoggedInUser(wsContext.getHttpServletRequest(), null);
    Any help is highly appreciated.
    Thanks in Advance!!
    BR,
    Uday

Maybe you are looking for