Quantcast
Channel: SCN : All Content - SAP Business Process Management
Viewing all 887 articles
Browse latest View live

BPM DC build exception - REPORTINGDEFINITIONCOMPILER

$
0
0

Hi All,

 

I am new to BPM, working on simple BPM development component. I followed the steps in mentioned in this document:

 

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/307336b8-098c-2d10-be9c-d41ae345f0ff?QuickLink=index&…

 

While building the DC, facing the below error:

 

Error:  "BPM.bp.000021" BC-BMT-BPM-SRV com.sap.tc.glx.BpemTask execute() -  Exception during event definition compilation, compilerType: REPORTINGDEFINITIONCOMPILERcaused by java.lang.ClassNotFoundException: com.sap.glx.paradigmInterface.bpmn.compiler.reportingdefinition.ReportingDefinitionCompiler

at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)

at java.lang.ClassLoader.loadClass(ClassLoader.java:303)

at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

at com.sap.tc.buildtool.PluginClassLoader.loadClass(PluginClassLoader.java:318)

at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:169)

at com.sap.tc.glx.BpemTask.processCompiler(BpemTask.java:331)

at com.sap.tc.glx.BpemTask.callCompilers(BpemTask.java:318)

at com.sap.tc.glx.BpemTask.execute(BpemTask.java:179)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)

at org.apache.tools.ant.Task.perform(Task.java:364)

at org.apache.tools.ant.Target.execute(Target.java:341)

at org.apache.tools.ant.Target.performTasks(Target.java:369)

at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)

at org.apache.tools.ant.Project.executeTarget(Project.java:1185)

at com.sap.tc.buildplugin.techdev.ant.util.AntRunner.run(AntRunner.java:114)

at com.sap.tc.buildplugin.DefaultAntBuildAction.execute(DefaultAntBuildAction.java:57)

at com.sap.tc.buildplugin.DefaultPlugin.handleBuildStepSequence(DefaultPlugin.java:195)

at com.sap.tc.buildplugin.DefaultPlugin.performBuild(DefaultPlugin.java:167)

at com.sap.tc.buildplugin.DefaultPluginV3Delegate$BuildRequestHandler.handle(DefaultPluginV3Delegate.java:66)

at com.sap.tc.buildplugin.DefaultPluginV3Delegate.requestV3(DefaultPluginV3Delegate.java:48)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at com.sap.tc.buildtool.v2.impl.PluginHandler2.maybeInvoke(PluginHandler2.java:403)

at com.sap.tc.buildtool.v2.impl.PluginHandler2.request(PluginHandler2.java:149)

at com.sap.tc.buildtool.v2.impl.PluginHandler2.build(PluginHandler2.java:87)

at com.sap.tc.buildtool.PluginHandler2Wrapper.execute(PluginHandler2Wrapper.java:59)

at com.sap.tc.devconf.internal.DCProxyMake.make(DCProxyMake.java:318)

at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:1432)

at com.sap.tc.devconf.internal.DCProxy.make(DCProxy.java:3875)

at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.build(BuildJob.java:370)

at com.sap.ide.dii05.lib.internal.commands.dc.BuildJob.doInWorkerThread(BuildJob.java:181)

at com.sap.ide.dii05.util.api.job.JdiJob$1.doInWorkerThread(JdiJob.java:77)

at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3$1.run(InternalJdiJob.java:199)

at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)

at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)

at com.sap.ide.dii05.util.internal.job.InternalJdiJob$3.run(InternalJdiJob.java:208)

at com.sap.ide.dii05.util.internal.job.BusyBackgroundIndicator.showWhile(BusyBackgroundIndicator.java:74)

at com.sap.ide.dii05.util.internal.job.InternalJdiJob.internalRun(InternalJdiJob.java:189)

at com.sap.ide.dii05.util.internal.job.InternalDiiJob.runInternal(InternalDiiJob.java:306)

at com.sap.ide.dii05.util.internal.job.InternalDiiJob.runR(InternalDiiJob.java:204)

at com.sap.ide.dii05.util.internal.job.InternalDiiJob.run(InternalDiiJob.java:192)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

 

For the full log, attaching the same for reference.

 

 

Inserting the dependencies of the respective component:

bpm error.png

 

 

Any help is highly appreciated.

 

Regards,

Manoj


Error: The selected component is not supported. One of the out ports has duplicate context elements

$
0
0

Dear Experts.

 

I have created VC Ui for Create Purchase Request & I Successfully deployed it by using NWDS (not from Browser).

 

But when tried to using it in BPM by assigning a task to Human based activity, It was saying.

 

"The selected component is not supported. One of the in ports has duplicate context elements."

I rename a fields with duplicate names the above error gone.

 

But now its giving the same error for Out ports.

 

The selected component is not supported. One of the out ports has duplicate context elements.

As i tried to rename the out port field but rename button is disabled.

 

Please advice & help me to solve this.

 

 

Thanks & Regards,

 

Dipen.

SAP PO 7.31 Operation Mapping in BPM - Could not invoke service reference name

$
0
0

Hi

I have followed William Li's blog on how to use Operation Mapping in a BPM.  I have built and deployed this but I get a run time error when it executes the operation mapping.   A technical error during invocation: Could not invoke service reference name

 

This error is normally related to the wrong service reference type being selected.  The guides and blogs suggest in the case of an Operation Mapping that is imported as a WSDL the correct one is WS.

 

The operation mapping I have imported has a Outbound Async to Inbound Async service interface.

 

Has anybody experienced this error?

 

 

I have seen in the deployed BPM's Application Configuration against the Consumed Service Groups an error against the associated service group

 

Configuration for service
group [SG_localhost] failed. Error details: [No endpoints found. Check if the  service is configured and if its endpoints are available in the . Service

 

It almost seems that it wants me to publish the end point on the service registry -  no idea how....but I none of the blogs and post indicate that I need to fiddle with this at all.    Here is the error too that I see when looking at the deployed BPM application configuration.  Clearly the problem but I've no idea how to resolve this.

LGProvider.PNG

The operation mapping that is imported into my BPM as a WSDL has a curious end point... port 50500 - weird - as does not exist does it - where did it get this from.   seems to me that it needs this deployed in the Service Registry  - but how do I do this  - or even do I need to do this ?  btw SAP Help does not say to do this anyway.

wsdl.PNG

BPM DC Build ERROR: Could not set up build infrastructure path list

$
0
0

HI Experts,

 

i am developing a BPM Development Component, it has no code errors and is very simple. but, when i try to build it, it throws the following error:

 

 

*Start build plugin:*

   *ERROR: Could not set up build infrastructure path list:Used component tc/bpem/compiler/base(SC null) not available*

   *Build failed with errors.*

 

I have already set in NWDI the required dependencies according to SAP notes. Apparently there is anotehr dependency, or i dont know.

 

any Sugestion about it?

thanks

Looking for a good book on SAP/UTP

$
0
0

Does anyone know of a good book that explains some good and more advanced scripting between SAP and UTP?  (or QTP).  I am finding it difficult to find explains of SAP/UTP scripting.  Please advise and thanks. -R-

BPM and standard attachmentns: where attachments are stored?

$
0
0

Hello experts,

 

     Good Day!!

 

Can anyone tell me where I can find attached to BPM process attachments (using standard attachment functionality)?

    

They are definitely stored somewhere because when even process is completed. It may be ECM or somewhere but I am not sure.

Especially, I do not understand how I can retrieve the attachments which are created already using standard BPM attachment functionality. I want to retrieve the attachments and displayed in another custom WD application.

 

If anyone has got any information related to the topic would you please share?

 

Thanks and Regards,

    

Vasu

BPM process error

$
0
0

Hi

 

We have a BPM process  on NW 7.3. A particular process went into error.

The process error log showns the below error.

 

 

com.sap.glx.core.kernel.api.TransitionRollbackException: Exception during prepare, rolling back

com.sap.glx.core.kernel.mmtx.AbstractTransactionBase.rollback(AbstractTransactionBase.java:804)

com.sap.glx.core.kernel.mmtx.AbstractTransaction.do_prepare(AbstractTransaction.java:202)

com.sap.glx.core.kernel.mmtx.AbstractTransaction.commit(AbstractTransaction.java:81)

com.sap.glx.core.kernel.execution.LeaderWorkerPool$Follower.run(LeaderWorkerPool.java:124)

com.sap.glx.core.resource.impl.common.WorkWrapper.run(WorkWrapper.java:58)

com.sap.glx.core.resource.impl.j2ee.J2EEResourceImpl$Sessionizer.run(J2EEResourceImpl.java:249)

com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator$1.run(ServiceUserManager.java:152)

java.security.AccessController.doPrivileged(Native Method)

javax.security.auth.Subject.doAs(Subject.java:337)

com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator.run(ServiceUserManager.java:149)

com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

java.security.AccessController.doPrivileged(Native Method)

com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:185)

 

log2 :

com.sap.glx.core.kernel.api.TransitionRollbackException: Exception during prepare, rolling back

com.sap.glx.core.kernel.mmtx.AbstractTransactionBase.rollback(AbstractTransactionBase.java:804)

com.sap.glx.core.kernel.mmtx.AbstractTransaction.do_prepare(AbstractTransaction.java:202)

com.sap.glx.core.kernel.mmtx.AbstractTransaction.commit(AbstractTransaction.java:81)

com.sap.glx.core.kernel.mmtx.PrimaryTransaction.inPrepare(PrimaryTransaction.java:136)

... (12 more)

 

Log3 :

 

com.sap.glx.core.kernel.api.CancelTransitionException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

com.sap.glx.mapping.execution.api.exception.TExecutionException

at GenericGet( StandardInvocation:invoker )

at ( DeepExpression )

at http://www. InvestmentSchema:CurrentCollectionItem( TerminalPart:expression )

at:DO_ApprovalProcess( NarrowPart:child )

at ( NarrowMapping )

com.sap.glx.core.internaladapter.ExceptionAdapter.raiseException(ExceptionAdapter.java:647)

com.sap.glx.core.internaladapter.ExceptionAdapter.raiseException(ExceptionAdapter.java:617)

com.sap.glx.core.internaladapter.Transformer$ExceptionProvider.createTransitionException(Transformer.java:616)

com.sap.glx.core.internaladapter.Transformer$TransformerTemplateAccessor$MapperTemplate$ImplementedInvocationHandler.invoke(Transformer.java:3075)

com.sap.glx.core.internaladapter.Transformer$TransformerInvocationHandler.invoke(Transformer.java:3356)

com.sap.glx.core.dock.impl.DockObjectImpl.invokeMethod(DockObjectImpl.java:544)

com.sap.glx.core.kernel.trigger.config.Script$MethodInvocation.execute(Script.java:248)

com.sap.glx.core.kernel.trigger.config.Script.execute(Script.java:798)

com.sap.glx.core.kernel.execution.transition.ScriptTransition.execute(ScriptTransition.java:67)

com.sap.glx.core.kernel.execution.transition.Transition.commence(Transition.java:138)

com.sap.glx.core.kernel.mmtx.DirectNestedTransaction.inPrepare(DirectNestedTransaction.java:67)

... (15 more)

 

Log4:

 

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

com.sap.glx.mapping.execution.api.exception.TExecutionException

at GenericGet( StandardInvocation:invoker )

at ( DeepExpression )

at http:// InvestmentSchema:CurrentCollectionItem( TerminalPart:expression )

at Approval_Process_Pool:DO_ApprovalProcess( NarrowPart:child )

at ( NarrowMapping )

com.sap.glx.mapping.execution.implementation.rule.invocation.StandardInvocation.step(StandardInvocation.java:132)

com.sap.glx.mapping.execution.implementation.rule.expression.DeepExpression$Resolver.resolve(DeepExpression.java:46)

com.sap.glx.mapping.execution.implementation.rule.expression.DeepExpression$Resolver.<init>(DeepExpression.java:28)

com.sap.glx.mapping.execution.implementation.rule.expression.DeepExpression.internalExpress(DeepExpression.java:78)

com.sap.glx.mapping.execution.implementation.rule.expression.AbstractExpression.express(AbstractExpression.java:45)

com.sap.glx.mapping.execution.implementation.rule.part.AbstractPart.processExpression(AbstractPart.java:131)

com.sap.glx.mapping.execution.implementation.rule.part.AbstractPart.partake(AbstractPart.java:92)

com.sap.glx.mapping.execution.implementation.rule.part.NarrowPart.processChildren(NarrowPart.java:48)

com.sap.glx.mapping.execution.implementation.rule.part.AbstractPart.partake(AbstractPart.java:96)

com.sap.glx.mapping.execution.implementation.rule.mapping.NarrowMapping.internalMap(NarrowMapping.java:40)

com.sap.glx.mapping.execution.implementation.rule.mapping.AbstractMapping.map(AbstractMapping.java:44)

com.sap.glx.mapping.execution.implementation.Runner.transform(Runner.java:66)

com.sap.glx.mapping.execution.implementation.Runner.transform(Runner.java:43)

com.sap.glx.core.internaladapter.Transformer$TransformerTemplateAccessor$MapperTemplate$ImplementedInvocationHandler.map(Transformer.java:3089)

... (23 more)

 

Log5 :

 

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

java.util.ArrayList.RangeCheck(ArrayList.java:547)

java.util.ArrayList.get(ArrayList.java:322)

com.sap.glx.mapping.execution.implementation.function.builtin.generic.GenericGetFunction.invokeNative(GenericGetFunction.java:109)

... (37 more)

 

the DO parameters looks fine when I checked in NWA. Could you  please guide me on what could be the possible issue .

 

Regards

KG

Register now: Solving the workflow inbox clutter - Manage all your workflow tasks in SAP Fiori


SAPUI5 Integration into SAP BPM Made Easy

$
0
0

SAPUI5 Integration into SAP BPM Made Easy


Introduction: Previously, integrating to custom UIs into SAP BPM involved the use of the BPM Java API. The ease of integrating custom UIs into SAP BPM offers more possibilities with the introduction of the BPM Odata. Integrating SAPUI5 into a BPM process has become easier with the introduction of the BPM Odata. This article provides a detailed insight on how to execute a human task from a SAP BPM process using the SAPUI5 technology.


Prerequisites: NWDS 7.31 SP13 and above

Generating a SAPUI5 DC from your SAP BPM

After creating a sample BPM process as shown below, perform the following actions to generate the SAPUI5 user interface from within the process:

  1. a) Create or import an XSD Schema to be assigned to the data object that will be used to hold the process’s data. In this article, a service interface from SAP PO’s Enterprise Service Repository was imported and assigned to the process.
  2. b) Select the human activity “Approve” from the process. In the property section and the Task sub tab; choose the “new” option from the task attribute as indicated by Figure 1.

SAPUI5_1.jpg

                                        Figure 1: Creating a new SAPUI5 application from SAP BPM.

c)      A new wizard will start to facilitate the generation of the SAPUI5. Follow the wizard to create a development component for SAPUI5. Name the task as shown in Figure 2.

SAPUI5_2.jpg

                              Figure 2: Naming the SAPUI5 Task.

d)      For the attribute UI Technology, select the value “SAPUI5” from the dropdown. In case a development component needs to be created, choose the option new and follow wizard to create a new DC. See Figure 3.

 

SAPUI5_3.jpg

                              Figure 3: Selecting the SAPUI5 Technology.

e)      Follow the wizard until the last step to select the Data Object to be used as the basis to generate the SAPUI5 user interface. Refer to Figure 4.

SAPUI5_4.jpg

               Figure 4: Process Context details for generating the SAPUI5 application.

f)      Once you click on the finish button, the SAPUI5 technology generates its own data type from the original data object within the process context. The result is presented in Figure 5.

SAPUI5_5.jpg

Figure 5: Custom SAPUI5 Data types generated.

g)      Open the task folder under the SAP BPM project tree and select the role tab. From there select user(s) from the UME to be assigned to this task as potential owners. See Figure 6.

SAPUI5_6.jpg

 

                              Figure 6: Assigning task potential owner to SAPUI5 for task execution.

h)      From the NWDS tool, switch to the “Web” perspective to view all the files which have been generated for the SAPUI5 DC. Navigate the DC project structure and notice the generated folders, libraries, JSON and index files. An impression of the project tree structure is shown in Figure 7.

SAPUI5_7.jpg

 

                         Figure 7: JavaScript code generated for the SAPUI5  controller

 

i)      The created SAPUI5 DC will need to be deployed to the SAP PO server as an enterprise archive file. You need to create an EAR DC and add the SAPUI5 as a dependency to it. From Figure 7, you can see an EAR DC named “dc_sapui5_aer”. Figure 8 demonstrates how the dependency to the “dc_sapui5” is created.

SAPUI5_8.jpg

 

                    Figure 8: EAR DC created its dependency to the SAPUI5 DC.

 

Note: Extra steps need to be taken to ensure that the human task notifications of the BPM are sent to the BPM Inbox. In SAP PO, by default the value for the notificationTask inbox is set to the Universal Worklist (UWL). However, in case you would like the notification to be consumed by the “BPM inbox”, this value will need to be set to “bpm_inbox” instead.

 

j)      Configure the “notificationTask” inbox settings by navigating through Java System properties of the NetWeaver Administrator (NWA) and set the value - as shown by Figure 9.

SAPUI5_9.jpg

 

               Figure 9: NWA settings for notificationTask from uwl to bpm_inbox

k) It is finally time to build and deploy the BPM process and the EAR DCs. Building and deploying the EAR DC will automatically perform the same actions for the SAPUI5 DC because of the dependency that exists between them and that we previously defined. 

 

After the DCs have been deployed, the BPM process can be started from the Process Repository application in the NWA.

The steps described above have highlighted the activities needed to generate a SAPUI5 application from within a SAP BPM process context. In the next steps, we will be performing a test to complete a task from our SAPUI5 application using BPM Inbox. Once an employee triggers an order request from a web client, this data is passed to the BPM process. The manager can then view and complete the task which has been assigned to him/her via the BPM inbox.

 

Note: The URL of the BPM Inbox to view and complete the task to be consumed by a SAPUI5 application is  http://<hostname>:<port>/bpminbox

The following roles should be assigned to a user to be able to access the bpm inbox:

1. UnifiedInboxUserRole: this role allows the user to view the list of tasks and their details in the BPM inbox.

2. com.sap.bpem.Enduser: enables users to manage and work on the task.

 

Proceed to the bpm inbox to claim the employee task and fill in the details. Once the employee task is completed, you are able to claim the manager’s task and complete it as shown in Figure 10.

SAPUI5_10.jpg

 

                         Figure 10: BPM Inbox tasks for SAPUI5..

Finally, to complete the task from the SAPUI5 application, open a web browser and enter the URL pattern described above. If the application has been properly deployed by the EAR file, it should be accessible via the browser.

SAPUI5_11.jpg

               Figure 11: Completing a task from the SAPUI5 application via the web browser.

The manager can preview the details filled or change any of the previous values passed into the process by the employee, then complete the task.

In the previous paragraphs, we have been able to discuss the basic steps involved in executing a human task within a SAP BPM process using the SAPUI5 technology. Note that the SAPUI5 application generated within the process context can be modified and extended to meet the business and functional requirements desired.

 

Conclusion: The blog has been able to explicitly highlight the necessary steps to integrate SAP UI5 into a SAP BPM process, so that tasks can be completed from different devices.

 

Written by: Abidemi Olatunbosun

Triggering BPM start gives lock error

$
0
0

Hi experts,

 

We have a CE BPM process that works fine in our DEV system but errors in our TEST system We've tried undeloying/reimporting but still no good. It does have a normal start trigger and an immediate event within the process.We ae using CE 7.3 SP05 and get the following error:

 

run(): exception occurred
[EXCEPTION]
com.sap.engine.interfaces.webservices.runtime.RuntimeProcessException: Technical difficulties were experienced during process execution.
at com.sap.glx.adapter.app.ucon.UnifiedConnectivityAdapter.invokeProvisionedMethod(UnifiedConnectivityAdapter.java:1030)
at com.sap.glx.adapter.app.ucon.wsprov.GalaxyImplementationContainer.invokeMethod(GalaxyImplementationContainer.java:111)
at com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:730)
at com.sap.engine.services.webservices.espbase.server.runtime.OneWayProcessor.run(OneWayProcessor.java:68)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:185)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:302)
Caused by: com.sap.glx.core.kernel.api.TransitionRollbackException: Exception during prepare, rolling back
at com.sap.glx.core.kernel.mmtx.AbstractTransactionBase.rollback(AbstractTransactionBase.java:847)
at com.sap.glx.core.kernel.mmtx.AbstractTransaction.do_prepare(AbstractTransaction.java:202)
at com.sap.glx.core.kernel.mmtx.AbstractTransaction.commit(AbstractTransaction.java:81)
at com.sap.glx.adapter.app.ucon.UnifiedConnectivityAdapter.invokeProvisionedMethod(UnifiedConnectivityAdapter.java:1000)
... 7 more
Caused by: com.sap.glx.core.kernel.api.TransitionLockingException: Unable to certify lock GalaxyCowLock$LockImpl@53ce1334[state=0x1c/11100, owner=com.sap.glx.core.kernel.mmtx.PrimaryTransaction@400e5237[startTime=1387205989764, persistent=true, internal=false, interactive=true, commited=false, completed=false, closed=false, ended=false, endtime=0]] in ticket com.sap.glx.core.kernel.mmtx.PrimaryTransaction@400e5237[startTime=1387205989764, persistent=true, internal=false, interactive=true, commited=false, completed=false, closed=false, ended=false, endtime=0] for image Image:Request{ff553190-6405-11e3-aabd-00000087105e}xxxxxxxxxxxx(removed my ref) [matched, refCount=0][S].
at com.sap.glx.core.dock.storage.impl.StorageManagerImpl.prepare(StorageManagerImpl.java:362)
at com.sap.glx.core.kernel.mmtx.PrimaryTransaction.inPrepare(PrimaryTransaction.java:205)
at com.sap.glx.core.kernel.mmtx.AbstractTransaction.do_prepare(AbstractTransaction.java:200)
... 9 more


I've seen other similar posts but they were all 7.2 related. Please can anyone help?


Cheers,

Russ.

BPM OData: Administrative Process UI

$
0
0

This blog post, as part 6 of BPM OData blog series, refers to the OData Service in SAP BPM available with SAP NetWeaver 7.3 EHP 1 SP 09 and higher. The features described in this blog post are available with SAP NetWeaver 7.3 EHP 1 SP 14 and higher. Before reading this blog post, it is recommended to read the previous parts of BPM OData blog series.

 

Overview

This blog post as well as all the previous blog posts about the BPM OData service is based on the business scenario in a credit institution. Previously, the scenario was considered from the point of view of the different participants. We were considering it from the point of view of the employees of the credit institution when we were talking about implementation of a task UI as well as from the point of view of the customer who submitted his data in the blog post about a process start UI. In this blog post, the scenario will be considered from the point of view of the department manager of the credit institution. One of the responsibilities of such a manager is to monitor and manage all the activities in his department. In our case, the BPM process containing the tasks to verify the customer data and to provide a credit limit can be considered as an example of the activity. Therefore, monitoring and management of the activities becomes monitoring and management of the processes. This blog post describes how to build an SAPUI5 application for such an administrative UI.

 

BPM Processes OData Service

Starting from SAP NetWeaver 7.3 EHP 1 SP 14 the BPM OData service provides functionality to access a collection of processes and to perform operations on a process. For that purpose, BPM Processes OData service should be used. This service as well as all the BPM OData services is available under ‘bpmodata’ root URL and has the ‘processes.svc’ name. The set of operations provided by the service includes the following:

  • Access to a collection of BPM processes
  • Suspend a process
  • Resume a process
  • Cancel a process

 

The service URLs can be represented using the following pattern:

http://<host>:<port>/bpmodata/processes.svc/<OData_resource_path_and_query_options>

 

Accessing a Collection of Processes

One of the responsibilities of the department manager in the business scenario is to monitor processes in his department. In scope of this activity, the manager should be able to see the processes including the information about the process time line, status, and the person who started the process. To represent information about a process, the BPM Processes OData service provides ProcessInstance entity type which contains all the required information. The metadata for the entity type is shown below:

 

<EntityType Name="ProcessInstance">    <Key>        <PropertyRef Name="InstanceId"/>    </Key>    <Property Name="InstanceId" Type="Edm.String" Nullable="false"/>    <Property Name="Name" Type="Edm.String" Nullable="false"/>    <Property Name="Subject" Type="Edm.String" Nullable="true"/>    <Property Name="StartDate" Type="Edm.DateTimeOffset" Nullable="false"/>    <Property Name="EndDate" Type="Edm.DateTimeOffset" Nullable="true"/>    <Property Name="ModelId" Type="Edm.String" Nullable="false"/>    <Property Name="DefinitionId" Type="Edm.String" Nullable="false"/>    <Property Name="Status" Type="Edm.String" Nullable="false"/>    <Property Name="ParentProcessInstanceId" Type="Edm.String" Nullable="true"/>    <Property Name="RootProcessInstanceId" Type="Edm.String" Nullable="true"/>    <Property Name="ProcessInitiatorName" Type="Edm.String" Nullable="true"/></EntityType>

 

In order to get a list of processes from the OData service, ProcessCollection entity set is used, which represents a collection of ProcessInstance entities.

More information about the service entity model can be found in the official documentation.

 

Obviously, a credit institution can have lots of processes. Some of them can be completed because a credit limit has been provided for the customer. Others can be canceled because the customer decided not to take a credit. Showing such processes to the manager makes no sense at all and makes the monitoring more difficult. Moreover, provisioning of all the processes via the OData service takes a lot of processing time on the server. Such a meaningless server load keeps the manager waiting. Which is definitely not what is expected. Based on the previous blog posts, some of you probably guessed that everything goes to the usage of $filter OData query option to limit the number of the returned entities and reduce the workload on the server. With the help of $filter query option the manager can specify which processes he would like to see and not to wait until all the processes are provided by the OData service.

 

In the BPM Processes OData service, every request to ProcessCollection entity set must have $filter query option in the request URL.

 

The table below shows the URL used to access a collection of processes along with the service response:

HTTP MethodGET
URL…/bpmodata/processes.svc/ProcessCollection?$filter=Status eq 'IN_PROGRESS' or Status eq 'SUSPENDED'&$format=json

Response Body

(simplified)

{    "d": {        "results": [            {                "InstanceId": "ffef91d67b8a11e4c1f300000034b6ba",                "Name": "CreateCustomerProcess",                "Subject": "Customer creation process",                "StartDate": "/Date(1417679765790)/",                "EndDate": null,                "ModelId": "e007956a10a6daea576611e3c5c62c413890274c",                "DefinitionId": "6c09936a310d118017f49889dfe194ec",                "Status": "IN_PROGRESS",                "ParentProcessInstanceId": null,                "RootProcessInstanceId": null,                "ProcessInitiatorName": "John_Smith"            }        ]    }
}

 

In the sample URL, $filter query option is used to retrieve all the running and suspended processes. Besides the $filter query option, $top and $skip query options are also supported for the ProcessCollection. More information about supported URLs for the ProcessCollection entity set and about the usage of $filter query option for it can be found in the official documentation.

Of course, the department manager is only interested in the processes which are running in his department. Therefore, the service response provides processes for which the current user is the process administrator. As a result, the manager can see only the processes which he is allowed to see and the ones he can manage, i.e. suspend, resume or cancel.

 

Performing Operations on a Process

Besides providing access to a collection of processes, the BPM Processes OData service also allows to suspend, resume or cancel a process. In our business scenario, the process can be suspended if an additional information should be provided by the customer and resumed once the required information is provided. The process can be canceled if a customer changed his mind and decided not to take a credit.

 

All the mentioned process actions are implemented as Suspend, Resume and Cancel function imports in the BPM Processes OData service. Each of the function imports works in a similar way requiring identifier of the process instance as the only input parameter and providing suspended, resumed or canceled process instances in the service response respectively.

 

The table below shows the URL used to suspend a process along with the service response:

HTTP MethodPOST
URL…/bpmodata/processes.svc/Suspend?InstanceId='ffef91d67b8a11e4c1f300000034b6ba'
Request HeadersAuthorizationBasic dXNlcm5hbWU6cGFzc3dvcmQ=
X-CSRF-Token781057a9-b96a-468c-b393-981f98292335
Acceptapplication/json
Response Body
{    "d": {            "InstanceId": "ffef91d67b8a11e4c1f300000034b6ba",            "Name": "CreateCustomerProcess",            "Subject": "Customer creation process",            "StartDate": "/Date(1417679765790)/",            "EndDate": null,            "ModelId": "e007956a10a6daea576611e3c5c62c413890274c",            "DefinitionId": "6c09936a310d118017f49889dfe194ec",            "Status": "SUSPENDED",            "ParentProcessInstanceId": null,            "RootProcessInstanceId": null,            "ProcessInitiatorName": "John_Smith"    }
}

 

In order to suspend, resume or cancel a process, the service user should be the process administrator.

 

Implementing the UI

Knowing the details about the consumption of the BPM Processes OData service the next step is to implement an administrative UI via the service. As it was mentioned before, such a UI should allow the department manager to monitor and manage the processes in his department. In this blog post, the following UI will be used as a sample:

 

admin_UI.png

 

In general, the administrative UI for the department manager looks pretty similar to the task inbox UI which was described in one of the previous blog posts. Besides the visual similarity, the implementation of the UIs is also quite similar. Therefore, it is highly recommended to read the blog post about the implementation of the custom task inbox UI before continuing reading, here. In the following sections only the differences between the both implementations will be described.

 

Implementing a UI for Accessing a Collection of Processes

Implementation of almost every SAPUI5 application for OData services starts with the creation of the service-specific ODataModel instance, and the administrative UI for the BPM Processes OData service is not an exception. The code snippet below shows the definition of the ODataModel in onInit() function of the SAPUI5 controller for the administrative UI:

 

onInit : function() {    var processesServicePath = "/bpmodata/processes.svc/";    var processesODataModel = new sap.ui.model.odata.ODataModel(processesServicePath, true);    processesODataModel.setDefaultCountMode(sap.ui.model.odata.CountMode.None);    processesODataModel.setDefaultBindingMode(sap.ui.model.BindingMode.OneWay);    this.getView().setModel(processesODataModel);
}

 

After the model is defined and set to the view, it is time to configure UI bindings. In our case, we use a table to show the processes on the UI. Therefore, the bindings should be specified for the table columns:

 

var processesTable = new sap.ui.table.Table({title : "Credit department processes" });
// define column bindings
processesTable.addColumn(new sap.ui.table.Column({    label : new sap.ui.commons.Label({text : "Name"}),    template : new sap.ui.commons.TextView({text : "{Name}"})
}));
processesTable.addColumn(new sap.ui.table.Column({    label : new sap.ui.commons.Label({text : "Subject"}),    template : new sap.ui.commons.TextView({text : "{Subject}"})
}));
processesTable.addColumn(new sap.ui.table.Column({    label : new sap.ui.commons.Label({text : "Status"}),    template : new sap.ui.commons.TextView({text : "{Status}"})
}));
processesTable.addColumn(new sap.ui.table.Column({    label : new sap.ui.commons.Label({text : "Started at"}),    template : new sap.ui.commons.TextView({text : {        path : "StartDate",        formatter : function(date) {            if (date) {                var dateFormatter = sap.ui.core.format.DateFormat.getDateTimeInstance({style : "medium"});                return dateFormatter.format(date);            }            return "";        }    }})
}));
processesTable.addColumn(new sap.ui.table.Column({    label : new sap.ui.commons.Label({text : "Started by"}),    template : new sap.ui.commons.TextView({text : "{ProcessInitiatorName}"})
}));

Having bindings for the table columns does not mean that the table will be populated with the data. Moreover, in the controller, we only set the model to the view but we have not bound the table to a property in the model representing the processes.

 

As it was mentioned before, to get a list of processes from the BPM Processes OData service a request should be sent to the ProcessCollection entity set. It was also mentioned that all the requests to the entity set must contain $filter query option in the request URL. Exactly the same situation was described in the blog post about implementing a custom task inbox UI, where it was necessary to get tasks from the TaskCollection entity set of the BPM Tasks OData service. In that blog post, we used SAPUI5 Filter objects to define value for $filter query option. After that, the created filters were used for the aggregation binding for the UI table with the tasks. In this blog post, we have to do exactly the same, adjusting the filters and the binding path according to the BPM Processes OData service.

 

First of all, let us define the filters. Of course, the department manager is interested in the processes which his subordinates are working on. Therefore, it is necessary to define the filters to show only running or suspended processes:

 

var inProgressStatus = new sap.ui.model.Filter("Status", sap.ui.model.FilterOperator.EQ, "IN_PROGRESS");
var suspendedStatus = new sap.ui.model.Filter("Status", sap.ui.model.FilterOperator.EQ, "SUSPENDED");

 

Having the filters, the next step is to define the aggregation binding for the UI table to ensure that the created filters will be used as a value of $filter query option when the binding is resolved by the ODataModel, i.e. when a request is sent to the OData service.

 

processesTable.bindRows("/ProcessCollection", null, null, [inProgressStatus, suspendedStatus]);

 

Such an aggregation binding will be resolved by the underlying ODataModel by sending the following request to the BPM Processes OData service:

 

…/bpmodata/processes.svc/ProcessCollection?$filter=Status eq 'IN_PROGRESS' or Status eq 'SUSPENDED'

 

That's it! Now, we have the table with the processes on the UI.

 

The entire implementation of the SAPUI5 view for the sample application can be found in the attached processAdmin.txt.zip file. In the sample application, static filtering is implemented, meaning that the $filter expressions are ‘hardcoded’ in the SAPUI5 view implementation. Dynamic filtering can also be implemented by adding a number of additional UI controls to specify the filter criteria, selecting a property by which the processes should be filtered (e.g. Status) and the filtering value (e.g. IN_PROGRESS).

 

Implementing a UI for Process Actions

In the previous section, we populated the table on the UI with the processes provided by the OData service. Now, the department manager can monitor the processes in his department. But he is a manager, meaning that he also wants to manage the processes that he can see. For that purpose, we have Suspend, Resume and Cancel buttons in the table toolbar. Suspend, Resume and Cancel process actions are represented as the corresponding function imports in the BPM Processes OData service, therefore, clicking on each of these buttons should result in sending the corresponding requests to the service. The similar situation has already been described in the blog post about implementing a custom task inbox UI. In that case, it was necessary to call the function import in order to release a task. In our case, the situation is pretty similar except of the names of the function imports and the names of their input parameters.

 

As usual, a JavaScript function which calls a function import should be implemented in the controller. Because the function imports for process actions are similar to each other, we can handle ‘press’ events for the UI buttons using one generic JavaScript function:

 

executeProcessAction : function(actionName, processInstanceId) {    if (!processInstanceId || !actionName) {        return;    }    // define messages to be shown in case of success and error    var successMessage = this.getSuccessMessage(actionName);    var errorMessage = actionName + " action failed.";    //define function import parameters    var functionParameters = {};    functionParameters.method = "POST";    functionParameters.urlParameters = { "InstanceId" : processInstanceId };    functionParameters.success = function() {        alert(successMessage);    };    functionParameters.error = function() {        alert(errorMessage);    };    var processesODataModel = this.getView().getModel();    // call the required function import    processesODataModel.callFunction(actionName, functionParameters);
}

 

The function takes two parameters: name of the action which should be performed and the identifier of the process instance on which the action should be performed. Technical details of calling OData function imports from SAPUI5 have been described in the blog post about implementation of a custom task inbox UI.

Full implementation of the SAPUI5 controller can be found in the attached processAdmin.txt.zip file.

 

Conclusion

This blog post has shown the implementation of the administrative UI for BPM processes using the BPM OData service. In this part, technical details of the BPM Processes OData service have been described. It was also shown how to consume the service from SAPUI5 and how to build a sample UI application based on it.

The attached processAdmin.txt.zip file contains the implementation of the administrative UI described in this blog post. The archive contains the implementation of both, SAPUI5 view and controller for the sample application. The attached implementation can be used to ‘play’ with the UI and is not intended to be used for production purposes.

Mass delete operation fail in CAF

$
0
0

Hi experts,

 

I am using the default BO delete operation to delete some line on table.

First i get the list of BO to delete and then i iterate over then deleting one by one, like that:

 

 

// listMyBO is the list containing all my BO
for(MyBO mob: listMyBO){    if (/*true clause*/) {         this.getMyBOServiceLocal().delete(mob);    }
}

When i execute this operation with a little bit quantity of BO in the listMyBO, the execution finish sucessfully and the records are deleted in the database.

 

If the list have a lot of BO the problem occurs. I tested the operation with 3000 BO in a list. The process execute with no error, but the records are not deleted on the database.

 

hope anyone have already see this...

 

I will apreciate your help.

 

Best regards

Archiving BPM Processes extremly slow

$
0
0

Hi all,

 

we have about 3500 processes a day and the DB is getting bigger very fast. So I began archiving via "java archiving cockpit" which is very "awesome" to use but thats another story. My main problem is that for archiving one day of production it is taking about 3 to 4 HOURS. The system already ran about 1 1/2 year. I'am scared to even calculate the time it would take me to get the system "clean". Is there any chance to get this faster?

 

Many thanks,

Tobias

Featured content - BPM space

$
0
0

Register now: Solving the workflow inbox clutter - Manage all your workflow tasks in SAP Fiori

http://scn.sap.com/profile-image-display.jspa?imageID=4225&size=72Register now for the highly anticipated global webinar on the upcoming SAP Fiori workflow inbox previewed at Teched&&dcode 2014. Read how in this blog by Jocelyn Dart. December 2014

BPM && Operational Process Intelligence @SAP TechEd && d-code in Berlin

Stephan2.png

Experience BPM and Operational Process Intelligence in Berlin! In his blog, Stephan Schluchter lists all the BPM, Process Orchestration and Operational Process Intelligence sessions. Have a look, pick your favored sessions, and JOIN. November 2014

Detection and Handling of Stuck BPMN Request-Confirmation Pattern

Boris.pngIn his blog, Boris Klinker provides ideas how to detect and handle processes that are stuck due to a communication or processing error in a request-confirmation pattern. He firstly examines the different reasons for stuck process instances in back-end communication and then shows with examples and screenshots how to handle such situations. October 2014

BPM OData: Implementing a Process Start UI

Vitaly Yarmolik just published another blog as part 5 of the BPM OData blog series. He describes again in a very practice-oriented manner and with code snippets how to implement a UI to provide customer data. Since the submission of the customer data is considered as the event, which starts the entire process, we call this UI also "Process Start UI". For details, see Vitaly's blog. September 2014

BPM Troubleshooting for Beginners

Sid.pngWhat to do when your process gets stucked? How to figure out why the process has been disrupted? With his blog, Siddhant Bhatankar helps you diagnose and troubleshoot problems with your BPM processes. In this blog, the troubleshooting steps are illustrated with many screenshots so that it is very easy to understand and to follow the steps. September 2014

BPM OData: Implementing a Custom Task Inbox

With the BPM Inbox, SAP NetWeaver BPM provides a central access to tasks and a variety of features around tasks, such as display and filter options, completion of tasks, etc. But what if you have some special requirements, which the standard BPM Inbox cannot fulfill? Build your own task inbox with the help of BPM OData service! How to do this? Follow the instructions in Vitaly Yarmolik's blog, part 4 of the famous BPM OData blog series. September 2014

*Recent Features*

Importing ARIS 7.2 Diagram into SAP BPM

$
0
0

Hi All,

 

We are trying to import the ARIS 7.2 diagram into SAP BPM.

 

But it looks like ARIS 7.2 cannot export the EPC diagram into BPMN2.0 format but can only export EPC Diagram into Graphic or XML format.

 

We are trying to find some method to import the ARIS 7.2 diagram into BPM, do we have any tool that can help us convert the XML/Graphical form EPC Diagram into BPMN 2.0 format;

OR can anyone please suggest any other method to import ARIS 7.2 diagrams into SAP BPM.

 

 

Thanks and Regards,

Neha Singh


Process is Hanging

$
0
0

Hi All,

We have several tasks that fails due to errors in process. See attachment for process overview and where the error occurs.

 

kindly advice how to fix this issues.

Error: The selected component is not supported. One of the out ports has duplicate context elements

$
0
0

Dear Experts.

 

I have created VC Ui for Create Purchase Request & I Successfully deployed it by using NWDS (not from Browser).

 

But when tried to using it in BPM by assigning a task to Human based activity, It was saying.

 

"The selected component is not supported. One of the in ports has duplicate context elements."

I rename a fields with duplicate names the above error gone.

 

But now its giving the same error for Out ports.

 

The selected component is not supported. One of the out ports has duplicate context elements.

As i tried to rename the out port field but rename button is disabled.

 

Please advice & help me to solve this.

 

 

Thanks & Regards,

 

Dipen.

WSDL issue in BPM project.

$
0
0

Hi Team

I have a BPM project on which i am working in NWDS 7.2 SP01

I have imported a WSDL file into the project, added it into new activity. Under Service Interface i can see a new package is created with the wsdl service in it.

When i reverted back the activity and build the project, the wsdl file was still there it was not deleted.

I deleted the wsdl file manually, by right click delete option. But when i do it this way, the package inside the Service Interface folder is not getting deleted, it is still there. There will be no option of right click and delete for that.

 

How to delete the package under Service Interface, if the wsdl file is already deleted??

 

Untitled.jpg

 

Regards

Osman

Show "Application Pane" on Completed task UI (BPM &UWL)

$
0
0

Hello Experts,

 

Can anyone please  help me out on this below scenario.

 

System : CE7.2

 

Workflow : BEPM & UWL

 

Scenario:

 

For New and In progress task we have Webdynpro custom UI to complete the task.

bpm_ui.png

 

Now once the task is completed and we check complete task its shows us only the “Task title” area.

 

Out requirement is to show the “Application pane” also for completed task. 

 

Please let me know whether it is possible to achieve ? If yes , how ?

 

Thanks & Regards,

Sambaran

Reg:Unable to claim a Task using BPM OData

$
0
0

Hi,

I am using BPM OData services to start,claim and complete a task .I am successfully able to start a process,Get data from a Task using OData services but not able to claim a Task.

 

I did try to test using Postman client but was getting 404 Error when I try to claim a task.

 

Can anyone help me in this context as it is very urgent for me.

 

Thanks,

NWUser

Viewing all 887 articles
Browse latest View live




Latest Images