{"id":27,"date":"2014-12-11T08:23:00","date_gmt":"2014-12-11T08:23:00","guid":{"rendered":"https:\/\/scgindia.in\/lhotsetechnologies\/dev\/2014\/12\/11\/workflow-details-using-mbean-in-aem\/"},"modified":"2019-09-19T13:09:33","modified_gmt":"2019-09-19T13:09:33","slug":"workflow-details-using-mbean-in-aem","status":"publish","type":"post","link":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/","title":{"rendered":"Workflow Details using MBean in AEM"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">When I was working on my project, I got an interesting task in which &#8211;&nbsp;<\/span><br \/>\n<span style=\"color: #274e13;\"><i><br \/>\n<\/i><\/span><span style=\"color: #274e13;\"><i>I have to retrieve workflow related information such as total number of model, total active model instances, total stale instances for a model, currently active model instances i.e. complete list as displayed in workflow launcher.&nbsp;<\/i><\/span><br \/>\n<span style=\"color: #274e13;\"><i><br \/>\n<\/i><\/span><span style=\"color: #274e13;\">In this post, I will explain how I complete this task.&nbsp;<\/span><span style=\"color: #274e13;\">There are lot of different ways to achieve these information for ex. you can write your own custom logic in sling servlet or service &amp; then you will got your result.<\/span><br \/>\n<span style=\"color: #274e13;\"><br \/>\n<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\"><i>But I am not going to do that. In place of it, I will use <b>&#8220;Workflow Maintenance Operation MBean&#8221;. <\/b>This JMX MBean provides a set of methods, using them, I am able to find required results.<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><b><span style=\"color: #660000;\">Agenda<\/span><\/b><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\"><b><i>1). How to use &#8220;Workflow Maintenance Operation MBean&#8221; to get workflow related information?<\/i><\/b><\/span><br \/>\n<span style=\"color: #274e13;\"><b><i><br \/>\n<\/i><\/b><\/span><\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png\"><span style=\"color: #274e13;\"><img fetchpriority=\"high\" decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png\" width=\"285\" height=\"320\" border=\"0\"><\/span><\/a><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png\"><span style=\"color: #274e13;\"><br \/>\n<\/span><\/a><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">For doing this I have created a project named as blog as shown in left figure &#8211;&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\">\n<div style=\"text-align: left;\"><span style=\"color: #274e13;\">Here, I create a component named as &#8211;<b><i>workflowDetailsUsingMbean<\/i><\/b> that uses MBean.<\/span><\/div>\n<\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><b><span style=\"color: #660000;\">Note : <\/span><\/b><span style=\"color: #274e13;\">&#8211; <i>all JMX MBeans are displayed at &#8211;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\"><b><i>http:\/\/localhost:4502\/system\/console\/jmx<\/i><\/b><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\"><b><i>&nbsp;<\/i><\/b><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">Here just search for <b><i>&#8220;workflow&#8221;<\/i><\/b>, you will find two MBean services &#8211;<\/span><br \/>\n<span style=\"color: #274e13;\"><br \/>\n<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\"><b><i>First having type&nbsp;Maintenance<\/i><\/b><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\"><b><i>Second having type Statics<\/i><\/b><\/span><\/div>\n<div style=\"text-align: justify;\">&nbsp;<\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">In this post I will use first MBean service and fetch results from this service.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">One more thing I want to ask you &#8211;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\"><b><i>Do you know, what is the difference between Sling Services and MBean Services?<\/i><\/b><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">Shortly, just open both kind of services you will see the difference in MBean services you have access to all the method provided in your service <b><i>(if exposed)<\/i><\/b> as well as you can directly execute these methods by providing there parameters which is not possible in case of sling services.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><b><span style=\"color: #660000;\">NOTE :- <\/span><i style=\"color: #274e13;\">If you have no idea about MBeans in AEM then in my next post, I am going to explain everything related to MBean as well as how to register them in AEM.<\/i><\/b><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">Now go to&nbsp;<\/span><i style=\"color: #274e13; font-weight: bold;\">http:\/\/localhost:4502\/system\/console\/jmx <\/i><span style=\"color: #274e13;\">link -&gt; <b><i>search for &#8220;workflow&#8221;<\/i><\/b>&nbsp;-&gt; <b><i>click on workflow MBean having type&nbsp;Maintenance<\/i><\/b>. you will get a screen as &#8211;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"clear: both; text-align: center;\">&nbsp;<\/div>\n<div style=\"clear: both; text-align: center;\"><a style=\"clear: left; float: left; margin-bottom: 1em; margin-right: 1em;\" href=\"http:\/\/3.bp.blogspot.com\/-7fVrAXSzw5U\/VIlEteJaypI\/AAAAAAAAA9U\/ksvfuQ7ofbA\/s1600\/second.png\"><img decoding=\"async\" src=\"http:\/\/3.bp.blogspot.com\/-7fVrAXSzw5U\/VIlEteJaypI\/AAAAAAAAA9U\/ksvfuQ7ofbA\/s1600\/second.png\" width=\"640\" height=\"416\" border=\"0\"><\/a><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<h2 style=\"background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 16px; line-height: 1.6; margin: 0.5em 0px 0px; padding: 0px;\">&nbsp;<\/h2>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">Here you can click on any of the provided method and provide its required parameters, you are able to get the result of these methods for ex. click on <\/span><b style=\"color: #274e13;\"><i>fetchModelList()<\/i><\/b><span style=\"color: #274e13;\"> method and click on invoke, you can see all model present at your instance.<\/span><\/div>\n<div style=\"text-align: justify;\">&nbsp;<\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">Now go to&nbsp;<\/span><span style=\"color: #274e13;\"><b style=\"font-style: italic;\">workflowDetailsUsingMbean <\/b>component jsp file and paste given code &#8211;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&lt;%@include file=&#8221;\/libs\/foundation\/global.jsp&#8221;%&gt;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&lt;%@page session=&#8221;false&#8221;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; contentType=&#8221;text\/html; charset=utf-8&#8243;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; import=&#8221;javax.management.MBeanServerConnection,&nbsp;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; javax.management.MBeanServer,<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i> java.lang.management.ManagementFactory,<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i> javax.management.ObjectName,<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i> javax.management.openmbean.TabularData,<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i> java.util.* &#8221; %&gt;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&lt;%<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; try<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i> {<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; \/*&nbsp;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"white-space: pre;\">&nbsp; <\/span>Get MBeanServer Instance for further infor read given link &#8211;&nbsp;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i><b>&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"white-space: pre;\">&nbsp; <\/span>https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/javax\/management\/MBeanServer.html<\/b><\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; *\/<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; MBeanServer server = ManagementFactory.getPlatformMBeanServer();<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; \/*<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"white-space: pre;\">&nbsp; <\/span>QueryNames Method have two parameter one is ObjectName to identify&nbsp;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; which MBean Service you are looking for &amp; other is QueryExpr which add<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; additional conditions to find this object it is similar as database&nbsp;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; where clauses.For further reading of ObjectName class go through the link &#8211;&nbsp;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i><b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; https:\/\/docs.oracle.com\/javase\/7\/docs\/api\/javax\/management\/ObjectName.html<\/b><\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; *\/<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; Set&lt;ObjectName&gt; names = server.queryNames(<\/i><\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new ObjectName(&#8220;com.adobe.granite.workflow:type=Maintenance,*&#8221;) , null);<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><i style=\"color: #660000; font-size: 14px;\">&nbsp; &nbsp; &nbsp; &nbsp; ObjectName workflowMBean = names.iterator().next();<\/i><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; \/*<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Server invoke method is used to invoke a particular operation on existing MBean instance.<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; It&#8217;s parameter details are as follows &#8211;&nbsp;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; invoke(ObjectName name, String operationName, Object[] params, String[] signature)<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"white-space: pre;\">&nbsp; <\/span>I am executing stale workflowitems method from AEM.<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; *\/<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; Object staleWorkflowCount = server.invoke(workflowMBean, &#8220;countStaleWorkflows&#8221;,&nbsp;<\/i><\/span><br \/>\n<span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;new Object[]{null}, new String[] {String.class.getName()});<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; int mystaleCount = (Integer)staleWorkflowCount;&nbsp;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; out.println(&#8220;&lt;h3&gt;Number of Stale workflow instances are &#8211; &#8220;+mystaleCount +&#8221;&lt;\/h3&gt;&#8221;);<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; \/*<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"white-space: pre;\">&nbsp; <\/span>Another method execution that returns list of all workflow model present at your instance.<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; *\/<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; TabularData modelList = (TabularData) server.invoke(workflowMBean, &#8220;fetchModelList&#8221;, null,null);<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; Iterator itr = modelList.keySet().iterator();<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><i><span style=\"color: #660000; font-size: 14px;\">&nbsp; &nbsp; &nbsp; &nbsp;out.println(&#8220;&lt;h3&gt;List of Workflow Models&lt;\/h3&gt;&#8221;);<\/span><\/i><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; while(itr.hasNext()){<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; out.println(itr.next().toString()+&#8221;&lt;br&gt;&#8221;);<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; &nbsp; &nbsp; }<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; }catch(Exception e){<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i> out.println(e.getMessage());<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp; &nbsp; }<\/i><\/span><\/div>\n<div style=\"text-align: justify;\">&nbsp;<\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>%&gt;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #660000; font-size: 14px;\"><i>&nbsp;<\/i><\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">I provide the description for all method used in JSP with&nbsp;reference&nbsp;URL. &nbsp;Everything is done just drop this component at your web page&nbsp;you will get number of stale workflow model instances as well as list of all available model at your AEM.<\/span><\/div>\n<div style=\"text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<div style=\"background-color: #eefff0; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 15px; line-height: 21.5599994659424px; text-align: justify;\"><b><span style=\"color: #660000;\">github repository link<\/span><\/b><\/div>\n<div style=\"background-color: #eefff0; text-align: justify;\"><span style=\"color: #0000ee; font-family: Times New Roman, Times, FreeSerif, serif;\"><span style=\"font-size: 15px; line-height: 21.5599994659424px;\"><b><i><u><a href=\"https:\/\/github.com\/vietankur009\/blog.git\">https:\/\/github.com\/vietankur009\/blog.git<\/a><\/u><\/i><\/b><\/span><\/span><\/div>\n<div style=\"background-color: #eefff0; font-family: 'Times New Roman', Times, FreeSerif, serif; font-size: 15px; line-height: 21.5599994659424px; text-align: justify;\"><span style=\"color: #274e13;\">&nbsp;<\/span><\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Happy Coding<\/strong><br \/>\n<strong>Namah Shivay<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I was working on my project, I got an interesting task in which &#8211;&nbsp; I have to retrieve workflow [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,33,90,93,91,92,95,89,94],"tags":[],"class_list":["post-27","post","type-post","status-publish","format-standard","hentry","category-aem","category-cq","category-jmx-mbeans-in-aem","category-mbeans-in-aem","category-mbeans-in-cq","category-workflow-details-in-aem-using-mbeans","category-workflow-maintenance-operation-mbean-in-aem","category-workflow-maintenance-operation-mbean-in-cq","category-workflow-mbean-service"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Workflow Details using MBean in AEM - AEM Blog | Lhotse Technologies<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Workflow Details using MBean in AEM - AEM Blog | Lhotse Technologies\" \/>\n<meta property=\"og:description\" content=\"When I was working on my project, I got an interesting task in which &#8211;&nbsp; I have to retrieve workflow [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/\" \/>\n<meta property=\"og:site_name\" content=\"AEM Blog | Lhotse Technologies\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-11T08:23:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-09-19T13:09:33+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png\" \/>\n<meta name=\"author\" content=\"Team Lhotse\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Team Lhotse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/\"},\"author\":{\"name\":\"Team Lhotse\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/fd7bee89b050d7c7195fc75b681b053d\"},\"headline\":\"Workflow Details using MBean in AEM\",\"datePublished\":\"2014-12-11T08:23:00+00:00\",\"dateModified\":\"2019-09-19T13:09:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/\"},\"wordCount\":1041,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png\",\"articleSection\":[\"AEM\",\"CQ\",\"JMX MBeans in AEM\",\"mbeans in aem\",\"mbeans in cq\",\"Workflow Details in AEM using Mbeans\",\"Workflow Maintenance Operation MBean in AEM\",\"Workflow Maintenance Operation MBean in cq\",\"workflow mbean service\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/\",\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/\",\"name\":\"Workflow Details using MBean in AEM - AEM Blog | Lhotse Technologies\",\"isPartOf\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png\",\"datePublished\":\"2014-12-11T08:23:00+00:00\",\"dateModified\":\"2019-09-19T13:09:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#primaryimage\",\"url\":\"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png\",\"contentUrl\":\"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/lhotsetechnologies.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Workflow Details using MBean in AEM\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#website\",\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/\",\"name\":\"AEM Blog | Lhotse Technologies\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/lhotsetechnologies.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#organization\",\"name\":\"AEM Blog | Lhotse Technologies\",\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/wp-content\/uploads\/2019\/07\/lhotse-logo.png\",\"contentUrl\":\"https:\/\/lhotsetechnologies.com\/blog\/wp-content\/uploads\/2019\/07\/lhotse-logo.png\",\"width\":539,\"height\":172,\"caption\":\"AEM Blog | Lhotse Technologies\"},\"image\":{\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/fd7bee89b050d7c7195fc75b681b053d\",\"name\":\"Team Lhotse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"Team Lhotse\"},\"url\":\"https:\/\/lhotsetechnologies.com\/blog\/author\/team-lhotse\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Workflow Details using MBean in AEM - AEM Blog | Lhotse Technologies","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/","og_locale":"en_US","og_type":"article","og_title":"Workflow Details using MBean in AEM - AEM Blog | Lhotse Technologies","og_description":"When I was working on my project, I got an interesting task in which &#8211;&nbsp; I have to retrieve workflow [&hellip;]","og_url":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/","og_site_name":"AEM Blog | Lhotse Technologies","article_published_time":"2014-12-11T08:23:00+00:00","article_modified_time":"2019-09-19T13:09:33+00:00","og_image":[{"url":"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png","type":"","width":"","height":""}],"author":"Team Lhotse","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Team Lhotse","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#article","isPartOf":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/"},"author":{"name":"Team Lhotse","@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/fd7bee89b050d7c7195fc75b681b053d"},"headline":"Workflow Details using MBean in AEM","datePublished":"2014-12-11T08:23:00+00:00","dateModified":"2019-09-19T13:09:33+00:00","mainEntityOfPage":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/"},"wordCount":1041,"commentCount":0,"publisher":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/#organization"},"image":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#primaryimage"},"thumbnailUrl":"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png","articleSection":["AEM","CQ","JMX MBeans in AEM","mbeans in aem","mbeans in cq","Workflow Details in AEM using Mbeans","Workflow Maintenance Operation MBean in AEM","Workflow Maintenance Operation MBean in cq","workflow mbean service"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/","url":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/","name":"Workflow Details using MBean in AEM - AEM Blog | Lhotse Technologies","isPartOf":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#primaryimage"},"image":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#primaryimage"},"thumbnailUrl":"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png","datePublished":"2014-12-11T08:23:00+00:00","dateModified":"2019-09-19T13:09:33+00:00","breadcrumb":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#primaryimage","url":"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png","contentUrl":"http:\/\/2.bp.blogspot.com\/-gTu-yVI0oAI\/VIk_KrT7WGI\/AAAAAAAAA88\/Tprn5NPaxQw\/s1600\/first_1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/lhotsetechnologies.com\/blog\/workflow-details-using-mbean-in-aem\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lhotsetechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Workflow Details using MBean in AEM"}]},{"@type":"WebSite","@id":"https:\/\/lhotsetechnologies.com\/blog\/#website","url":"https:\/\/lhotsetechnologies.com\/blog\/","name":"AEM Blog | Lhotse Technologies","description":"","publisher":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lhotsetechnologies.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/lhotsetechnologies.com\/blog\/#organization","name":"AEM Blog | Lhotse Technologies","url":"https:\/\/lhotsetechnologies.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/lhotsetechnologies.com\/blog\/wp-content\/uploads\/2019\/07\/lhotse-logo.png","contentUrl":"https:\/\/lhotsetechnologies.com\/blog\/wp-content\/uploads\/2019\/07\/lhotse-logo.png","width":539,"height":172,"caption":"AEM Blog | Lhotse Technologies"},"image":{"@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/fd7bee89b050d7c7195fc75b681b053d","name":"Team Lhotse","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lhotsetechnologies.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"Team Lhotse"},"url":"https:\/\/lhotsetechnologies.com\/blog\/author\/team-lhotse\/"}]}},"_links":{"self":[{"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/27","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=27"}],"version-history":[{"count":2,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":566,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/27\/revisions\/566"}],"wp:attachment":[{"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lhotsetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}