how can i execute ruleflow with the developer API.
i found example for create a rule flow.
i did not find example for running it.
The ROM, PROM, and RMA APIs are for rules (and repository artifact) manipulation and maintenance. To execute a ruleflow, create a deployment of your rules project and trigger your ruleflow in an entrypoint function.
See "Deploying Rule Services" in the reference documentation for more information on how to deploy your rule service.
i wrote code of connecting to repository and created NdPromProject object.
i am looking at "Common ROM API and PROM API Tasks " chapter of documantation.
i see chapter regarding "Creating a Ruleflow (NdPromFlowRuleflow)" but i don't understand how to actually run it.
should i create a blaze function that uses the ruleflow and run this function?
where can i find code example for that?
Take a look at "Developing Rule Projects" in the reference documentation (not the API documentation). There's a chapter on ruleflows there.
You have a couple of options with respect to ruleflows, depending on what version of BA you are using. If you are using 6.6 or greater, you can actually invoke a ruleflow as a function. For earlier versions, you usually do something like this inside a function (your entrypoint):
// If you have a starting event for your ruleflow:
// Regardless of whether you have a start event or a ruleflow that starts automatically:
(Note that this is taken from memory, so it might not compile. It should get you started, though.)
what you refer me to is methods to use inside builder functions.
i need to run the ruleflow with API from java code.
so i need to define an event in java and then post it? NdPromFlowEvent maybe?
how do i do it?
You don't call the server from the API. You create a deployment, and it is this deployment, or the runtime representation of that deployment, that you invoke.
ok. but that is not a generic solution. the wizard will have to run for each of the ruleflows.
is there a wat to do it generic? maybe by using the NdStatelessServer.invokeService?
I mean, can i create a context, NdRomConnectionContext, and connect to existing project using NdPromProject, and than connect to rule flow and run it.
the code will begin:
private NdPromProject promProject;
romContext = NdGenericRMASupport.connectToRepository(connectionArgs, true);\
NdRomDirectory romRoot = romContext.getRoot();
NdRomProject romProject = (NdRomProject)romRoot.lookupEntry(projectLocation);
promProject = projectFactory.createProject(romProject);
----> from here i want to continue and refer to the ruleflow object and run it. possible?
It is probably possible to create a deployment using the APIs, but I have never done it. You will not have to create a deployment for each ruleflow. You deploy projects, which can contain several ruleflows.
How do you expect to refer to this ruleflow? By name?
VP, Product Management
Let me ask you a few questions to make sure I understand the context...
Have you already deployed those ruleflows? In one or multiple services?
Did you use the quick deployer? Or did you update your .server file manually?
Are ruleflows added to the service "dynamically"?
I see that you get the name of the Project from the PROM. How do you know which ruleflow needed to be invoked?
Retrieving data ...