Author |
Message
|
akil |
Posted: Wed May 04, 2016 5:08 am Post subject: IIB9: CPM API, Subflow Nodes |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
Hi
From the CMP API, (using the documentation/sample and self written code), I am able to do the following
- find an application (getApplicationByName)
- find the message flows in the application (getMessageFlows)
- for each message flow
-- get the nodes (getNodes)
-- for each node, get all properties (getProperties)
I am stuck with 2 issues :
1. When the node is of type subflow, then I need to go into the subflow, and see the various nodes & their properties ; how do I do that?
2. The properties don't return a flag to say which ones were over-ridden, is that information lost on deployment or is there any way to get that information?
Regards
Akhilesh _________________ Regards |
|
Back to top |
|
 |
mqjeff |
Posted: Wed May 04, 2016 6:15 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It depends on how a subflow is built, I think.
If it's sourced and inlined, then you may need to append the name of the subflow node before the name of the nodes under it.
If it's not inlined, you may need to use the name of the subflow itself as the top element name, under the application.
May. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
akil |
Posted: Wed May 04, 2016 6:30 am Post subject: |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
When I list the nodes, I get a single code with type SubFlowNode; with the following properties : the nodes within the subflow aren't listed...
<node>
<name>VirtualCardManagementServiceInputFailureHandler</name>
<type>SubFlowNode</type>
<properties>
<property>
<name>traceLevel</name>
<value>none</value>
</property>
<property>
<name>userTraceLevel</name>
<value>none</value>
</property>
<property>
<name>subflowImplFile</name>
<value>gen.VirtualCardManagementServiceInputFailureHandler.subflow</value>
</property>
</properties>
</node> _________________ Regards |
|
Back to top |
|
 |
mqjeff |
Posted: Wed May 04, 2016 6:37 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Try getDeployedObjects or getMessageFlowDependencies.
Still wild guesses here. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
akil |
Posted: Wed May 04, 2016 7:16 am Post subject: |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
|
Back to top |
|
 |
mqjeff |
Posted: Wed May 04, 2016 7:23 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
If the subflow counts as a deployed object, then it should show up there. Without the subflow proxy, though, you might not be able to iterate over the nodes within one.
Also, again. What the broker knows about depends entirely on where and how the subflow was added to the bar. Compiled inline? Put in a library? Put in a specific schema? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
akil |
Posted: Wed May 04, 2016 5:59 pm Post subject: |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
The sub-flow is in a library & the intent is to list the properties of the nodes in the sub-flow.
Any suggestions on how to do this ? _________________ Regards |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu May 05, 2016 3:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Access the application, access the library, access the subflow, access its elements/properties etc...
This will be your path. You should have a property in the subflow (as deployed object of the flow) to reference the library it is in. You will then have to access it via that library.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
akil |
Posted: Thu May 05, 2016 4:39 am Post subject: |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
As suggested, I tried that ..
from the application -- i get the libraries
for each library -- i can get the deployed & runtime properties
However, for the library I can't access the subflow.
The only method in LibraryProxy is to getMessageFlows, which returns 0
There is no method to get to any subflow ..
What can I try? _________________ Regards |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu May 05, 2016 12:48 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
akil wrote: |
As suggested, I tried that ..
from the application -- i get the libraries
for each library -- i can get the deployed & runtime properties
However, for the library I can't access the subflow.
The only method in LibraryProxy is to getMessageFlows, which returns 0
There is no method to get to any subflow ..
What can I try? |
The method is to get the DeployableOjbects under the library and inspect them for their file extension...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
akil |
Posted: Thu May 05, 2016 10:25 pm Post subject: |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
With the DeployedObject interface, and picking up only basis the 'subflow' extension, I can find out the sub-flows.
How do I now get to the nodes ? The intent is to list the nodes and their properties as they are deployed on the server? _________________ Regards |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 06, 2016 1:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
akil wrote: |
With the DeployedObject interface, and picking up only basis the 'subflow' extension, I can find out the sub-flows.
How do I now get to the nodes ? The intent is to list the nodes and their properties as they are deployed on the server? |
So did you check if there were DeployedObjects of the subflow? Any properties? etc...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
akil |
Posted: Fri May 06, 2016 4:43 am Post subject: |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
Yes i did, it only returns 3 properties
Code: |
{modifyTime=2016-04-21 16:43:02.000 +0530, deployTime=2016-04-21 16:43:02.866 +0530, barFileName=/home/iibadm/code/workstation/y/GeneratedBarFiles/VirtualCardManagementServiceproject.generated.bar}
|
_________________ Regards |
|
Back to top |
|
 |
mqjeff |
Posted: Fri May 06, 2016 4:56 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Can you cast the subflow deployed object to a message flow object?
Can you otherwise use the same way you get nodes for a regular message flow on the returned subflow object? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
akil |
Posted: Sat May 07, 2016 12:47 am Post subject: |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
The DeployedObject that is returned for the subflow can't be cast to a MessageFlowProxy, (I get a ClassCastException). I can only cast it to a MessageFlowDependency.
MessageFlowDepenency has no available methods to getNodes, it seems to be interface to deal with message models and treats the subflow like a file.
For the MessageFlowProxy, there's a getNodes method that can be used to get the nodes..
Any more suggestions ? _________________ Regards |
|
Back to top |
|
 |
|