Microflow Scheduled Event Manager in Mx8

0
After converting a project from Mx 7 to Mx 8 a java compilation error appears with the following message: <projectpath>\javasource\scheduler\actions\EvaluateInstruction.java:46: error: cannot find symbol [javac] List<IMendixObject> result = Core.retrieveXPathQueryEscaped(sysContext, "//%s[%s=%s]", ScheduledAction.entityName, This is because of the Microflow Scheduled Event Manager module which uses the retrieveXPathQueryEscaped method from the Runtime API. This method has been deprecated according to the release notes.  Are there plans to makes this module Mx8 compatible? Is there a solution to avoid the retrieveXPathQueryEscaped error?
asked
3 answers
3

Hi

Please Replace deprecated API Core.retrieveXPathQueryEscaped  at <projectpath>\javasource\scheduler\actions\EvaluateInstruction.java and use Core.createXPathQuery API.

 

List<IMendixObject> result = Core.createXPathQuery( 
					String.format("//%s[%s=$actionid]", ScheduledAction.entityName,
					ScheduledAction.MemberNames.InternalId.toString())
					)
                    .setVariable("actionid",this.JobInstruction.getActionId())
                    .execute(sysContext);;

 

answered
2
List<IMendixObject> result = Core.createXPathQuery(String.format("//%s[%s='$xasid']", RuntimeInstance.getType(),RuntimeInstance.MemberNames.XASId.toString()) ).setVariable("xasid", Core.getXASId()).execute(context);

 

answered
0

Thank you Yogendra! Do you perphans know how to rewrite this code in ScheduledEventManager.java?

List<IMendixObject> result = Core.retrieveXPathQueryEscaped(context, 
			                            "//%s[%s='%s']", RuntimeInstance.getType(),
					                        RuntimeInstance.MemberNames.XASId.toString(), Core.getXASId());

 

answered