Posted: Sun Jun 26, 2016 4:25 am Post subject: Shared Library troubles
Acolyte
Joined: 11 Mar 2015 Posts: 71
I just stared using IIB 10 a few days ago and i'm trying to figure out how to resolve a problem.
On IIB 9 i had created a library, which contained a subflow. It contained 2 subflow, the main subflow had a loadcahe subflow within it. The structure of the main subflow was
Input
load cache subflow
compute
Out
The loadcache subflow read a file and loaded the xml which was routing data and stored it in cache.
Structure of sub flow :
Input
Compute (checkCache)
File Read (If no Cache)
Compute (LoadCache)
Out
Routing: BEGIN ATOMIC
IF CacheFile.valid IS NOT NULL THEN
SET OutputLocalEnvironment.Variables.meta[] = CacheFile.destinations.data[];
END IF;
END Routing;
If EXISTS(OutputLocalEnvironment.Variables.meta[]) IS FALSE
PROPAGATE TO TERMINAL 'out1';
RETURN FALSE;
END IF;
RETURN TRUE;
END;
Compute (LoadCache)
Code:
-- CALL CopyMessageHeaders();
--CALL CopyEntireMessage();
Routing: BEGIN ATOMIC
SET CacheFile.destinations.data[] = InputLocalEnvironment.Variables.meta.XMLNSC.RoutingData[];
SET CacheFile.valid = true;
END Routing;
RETURN TRUE;
END;
Compute node in main subflow
Code:
SET Environment.WSConfig.URL = CacheFile.destinations.data.RoutingData.WSConfig.URL;
Now, this library was a part of all my flows and just before i made a webservice call i would override the webservice URL in a compute node before the SOAPRequest node which also did the mapping in ESQL
Code:
SET OutputLocalEnvironment.Destination.SOAP.Request.Transport.HTTP.WebServiceURL = Environment.WSConfig.URL;
Now here is what i'm trying to achieve, what i'm trying to do in 10 is figure out how i can refer to the path to the XML out side the library.
My flow in IIB 10. I created my Addcache subflow as a shared library and all it contains is the load cache subflow same as IIB 9. I have not created a main subflow which contains this loadcache flow and the compute after which loads the url to the environment.
But what i'm trying to do in the compute node before the webservice call is call the CacheFile.
But that gives me a error because it cannot find reference to CacheFile.
I have tried using but same result.
Any suggestions on how to do this?
Code:
PATH Addcache;
SET OutputLocalEnvironment.Destination.SOAP.Request.Transport.HTTP.WebServiceURL = CacheFile.destinations.data.RoutingData.WSConfig.URL;
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum