How can I show on my own portlet view the process instance graph?
I tried to use the portlet include with portlet /portlet/wm_process_graph___processgraph but it keeps throwing an error.
The error is misleading because I can see the process instance if I follow the usual path on MWS: Monitoring → Business → Process Instances.
Thanks,
Bruno
java.sql.SQLException: Process Instance 04a7c432-4b9c-422d-ac71-faa047f06a9a not found
at com.webMethods.bpm.process.impl.db.common.LoadProcess.executeQuery(LoadProcess.java:25)
at com.webMethods.portal.service.sql.core.BaseSqlWorker.executeQueryProcResult(BaseSqlWorker.java:667)
at com.webMethods.portal.service.sql.core.BaseSqlWorker.executeQueryProcResult(BaseSqlWorker.java:632)
at com.webMethods.bpm.process.impl.BpmProcess.load(BpmProcess.java:348)
at com.webMethods.bpm.process.impl.BpmProcessManager.getProcess(BpmProcessManager.java:186)
at com.webMethods.caf.processgraph.ProcessGraphDefaultviewView.getBpmProcess(ProcessGraphDefaultviewView.java:49)
at com.webMethods.caf.processgraph.ProcessGraphDefaultviewView.getAnnotationJS(ProcessGraphDefaultviewView.java:148)
at sun.reflect.GeneratedMethodAccessor1929.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:261)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
at com.sun.faces.application.ValueBindingValueExpressionAdapter.getValue(ValueBindingValueExpressionAdapter.java:113)
at com.webMethods.caf.faces.application.CAFValueBinding.getValue(CAFValueBinding.java:57)
at javax.faces.component.ValueExpressionValueBindingAdapter.getValue(ValueExpressionValueBindingAdapter.java:84)
at javax.faces.component.UIOutput.getValue(UIOutput.java:184)
at com.webMethods.caf.faces.render.BaseRenderer.getValue(BaseRenderer.java:101)
at com.webMethods.caf.faces.render.html.output.ScriptRenderer.writeSrc(ScriptRenderer.java:41)
at com.webMethods.caf.faces.render.html.output.ScriptRenderer.encodeEnd(ScriptRenderer.java:29)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
at com.webMethods.caf.faces.component.util.ComponentUtils.renderComponent(ComponentUtils.java:91)
at com.webMethods.caf.faces.component.util.ComponentUtils.renderComponent(ComponentUtils.java:88)
at com.webMethods.caf.faces.view.BaseViewHandler.renderResponse(BaseViewHandler.java:258)
at com.webMethods.caf.faces.view.BaseViewHandler.renderView(BaseViewHandler.java:124)
at com.webMethods.caf.faces.portlet.PortletLifecycle$RenderResponsePhase.execute(PortletLifecycle.java:700)
at com.webMethods.caf.faces.portlet.PortletLifecycle.phase(PortletLifecycle.java:256)
at com.webMethods.caf.faces.portlet.PortletLifecycle.render(PortletLifecycle.java:185)
at com.webMethods.caf.faces.portlet.FacesPortlet.render(FacesPortlet.java:336)
…
What you are attempting to do should work, but the Monitor team doesn’t support this usage pattern. In other words, they don’t document what parameters need to be set on the portlet in order for it to be rendered. Additionally, no testing has occurred where they determine if their portlets can be embedded into custom CAF Applications.
If I needed to embed their portlet, i would go to an instance of their portlet that is functioning, and try to determine all of that portlets properties. One way to do that would be to save that portlet to a workspace, and then using the Admin View in Designer, examine all the properties of the portlet.
However, I haven’t tried this myself and I know the Monitor team hasn’t attempted this.
Although I followed your advice I’m still facing the same problem.
Is there an official approach on how to show the process diagram on a custom portlet?
In the meantime I was able to go a little further (by using another portlet: wm_bam_instance___image) and now I don’t get the error. But, I still don’t don’t see the process.
I have compared both my custom portlet and a working version of the wm_bam_instance___image portlet added into a workspace and the html is different.
I have attached the the div part were they differ. Check lines 33.
It seems the flash object on the bad one is simply missing!
One step further: it wasn’t loading the flash because the parent hideable panel had the lazy load feature enabled.
Now, I’m including the portlet within my custom portlet by using the “portlet include” control with the following parameters:
→ instanceId
→ modelId
→ deployVersion
→ modelType
→ endpointUrl
All these fields are correctly set.
While loading the portlet, MWS calls 2 web services: getProcessModelXML and getImageInfo but the first one (getProcessModelXML) fails because modelId input field is null. This is odd because the field is also used for the second web service and in that case the field is set!
I think I figured out why your portlet inclusion of the process image portlet does not work. I think the BAM image portlet has an internal defect in how handles bindings to the web service connectors: it manages bindings to getProcessImage in the right way, but fails to do properly for getProcessXML.
The reason the portlet works in the standard page is because, when these bindings fail, the resolution goes to GET parameters passed in the URL. Just take the example you are attempting now, and add to it a GET parameter “?modelId=”. It should work.
Hence, a way of solving this is, when a new modelId is entered, do a redirect from inside an action, so that the URL is rewritten to include this modelId. I am including an example of this, which is composed of:
-A portlet (showProcessModelP2) that incudes the process image one
-A MWS page (public folder) that in turn includes the showProcessModelP2 portlet, and binds to it the global configuration of Monitor for the IS URL. Currently I am binding this configuration to Folders > My webMethods Applications > Fabric Tasks > Administration > My webMethods > System Settings > Servers > System Settings , and then the monitorEndpointUrl property. However I actually do not know whether this setting is right, whether it works, or whether by default it just takes localhost:5555, because at runtime it just shows “”. However, if you need other value, you can use e.g. environment variables to configure it.
I am enclosing both the Designer project and the deployable war file, which includes the creation of the page (public folder) and the alias, so after deploying it you can go straight to /myShowProcessModel2 and see the portlet. Please use the Administrator account, since I suspect it will only work if the current MWS user has permissions in IS to call these services.
Hi,
Thax.this post helps alot.But Administrator only can now see the process graph ,no other project specific user can see this.Any permission I need to add that any project specific user can see the same.
This is urgent requirement.
I tried displaying process instance image on 8.2 by providing 3 parameters instanceId, modelId, deployVersion to portlet /portlet/wm_bam_instance___image inside portletInclude control but it gives binding error -->Failed to evaluate binding expression: “#{activePageBean.drilldownJS}”. Is there anyway to get hold of source code of system portlet or am i missing something because i gave all necessary permission to user to view business process and added them to monitor Administrator ACL and monitor user ACL. Any pointer would be of great help.