Skip to content

Commit

Permalink
Upgrade to 7.23.3, removed MxModelReflection dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspervanderhoek committed Nov 15, 2019
1 parent 494d3ae commit bbec06e
Show file tree
Hide file tree
Showing 210 changed files with 55,473 additions and 44 deletions.
Binary file modified MicroflowScheduledEventManager.mpr
Binary file not shown.
Binary file removed exports/Scheduler_5120_20150128.mpk
Binary file not shown.
Binary file removed exports/Scheduler_5120_20150130.mpk
Binary file not shown.
Binary file removed exports/Scheduler_5120_20150203.mpk
Binary file not shown.
Binary file removed exports/Scheduler_5120_20150302 (1.0).mpk
Binary file not shown.
Binary file removed exports/Scheduler_5120_20160408 (1.0.3).mpk
Binary file not shown.
Binary file removed exports/Scheduler_680_20170131 (1.1).mpk
Binary file not shown.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions javasource/scheduler/actions/AquireAdministrativeLock.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public AquireAdministrativeLock(IContext context, java.lang.Long TimeoutMS)
this.TimeoutMS = TimeoutMS;
}

@Override
@java.lang.Override
public java.lang.Boolean executeAction() throws Exception
{
// BEGIN USER CODE
Expand Down Expand Up @@ -82,7 +82,7 @@ public java.lang.Boolean executeAction() throws Exception
/**
* Returns a string representation of this action
*/
@Override
@java.lang.Override
public java.lang.String toString()
{
return "AquireAdministrativeLock";
Expand Down
4 changes: 2 additions & 2 deletions javasource/scheduler/actions/BuildCronExpression.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public BuildCronExpression(IContext context, IMendixObject action)
this.__action = action;
}

@Override
@java.lang.Override
public java.lang.String executeAction() throws Exception
{
this.action = __action == null ? null : scheduler.proxies.ScheduledAction.initialize(getContext(), __action);
Expand All @@ -38,7 +38,7 @@ public java.lang.String executeAction() throws Exception
/**
* Returns a string representation of this action
*/
@Override
@java.lang.Override
public java.lang.String toString()
{
return "BuildCronExpression";
Expand Down
45 changes: 45 additions & 0 deletions javasource/scheduler/actions/CheckIfMicroflowExists.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// This file was generated by Mendix Modeler.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
// Special characters, e.g., é, ö, à, etc. are supported in comments.

package scheduler.actions;

import com.mendix.core.Core;
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.webui.CustomJavaAction;

public class CheckIfMicroflowExists extends CustomJavaAction<java.lang.Boolean>
{
private java.lang.String MicroflowNameToCheck;

public CheckIfMicroflowExists(IContext context, java.lang.String MicroflowNameToCheck)
{
super(context);
this.MicroflowNameToCheck = MicroflowNameToCheck;
}

@java.lang.Override
public java.lang.Boolean executeAction() throws Exception
{
// BEGIN USER CODE
return Core.getMicroflowNames().contains(this.MicroflowNameToCheck);
// END USER CODE
}

/**
* Returns a string representation of this action
*/
@java.lang.Override
public java.lang.String toString()
{
return "CheckIfMicroflowExists";
}

// BEGIN EXTRA CODE
// END EXTRA CODE
}
7 changes: 3 additions & 4 deletions javasource/scheduler/actions/CommitInDifferentContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@

package scheduler.actions;

import scheduler.proxies.ApplicationSettings;
import com.mendix.core.Core;
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.webui.CustomJavaAction;
import com.mendix.systemwideinterfaces.core.IMendixObject;
import com.mendix.webui.CustomJavaAction;

public class CommitInDifferentContext extends CustomJavaAction<java.lang.Boolean>
{
Expand All @@ -25,7 +24,7 @@ public CommitInDifferentContext(IContext context, IMendixObject MyObject)
this.MyObject = MyObject;
}

@Override
@java.lang.Override
public java.lang.Boolean executeAction() throws Exception
{
// BEGIN USER CODE
Expand All @@ -50,7 +49,7 @@ public java.lang.Boolean executeAction() throws Exception
/**
* Returns a string representation of this action
*/
@Override
@java.lang.Override
public java.lang.String toString()
{
return "CommitInDifferentContext";
Expand Down
10 changes: 6 additions & 4 deletions javasource/scheduler/actions/EvaluateInstruction.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public EvaluateInstruction(IContext context, IMendixObject JobInstructionParamet
this.__JobInstructionParameter1 = JobInstructionParameter1;
}

@Override
@java.lang.Override
public java.lang.Boolean executeAction() throws Exception
{
this.JobInstructionParameter1 = __JobInstructionParameter1 == null ? null : scheduler.proxies.JobInstruction.initialize(getContext(), __JobInstructionParameter1);
Expand All @@ -43,8 +43,10 @@ public java.lang.Boolean executeAction() throws Exception
ScheduledAction action = this.JobInstructionParameter1.getJobInstruction_ScheduledAction(sysContext);
if ( action == null && this.JobInstructionParameter1.getActionId() != null ) {

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

if ( result.size() > 0 ) {
action = ScheduledAction.initialize(getContext(), result.get(0));
Expand Down Expand Up @@ -117,7 +119,7 @@ else if ( this.JobInstructionParameter1.getActionType() != null ) {
/**
* Returns a string representation of this action
*/
@Override
@java.lang.Override
public java.lang.String toString()
{
return "EvaluateInstruction";
Expand Down
4 changes: 2 additions & 2 deletions javasource/scheduler/actions/GetApplicationSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public GetApplicationSettings(IContext context)
super(context);
}

@Override
@java.lang.Override
public IMendixObject executeAction() throws Exception
{
// BEGIN USER CODE
Expand Down Expand Up @@ -53,7 +53,7 @@ public IMendixObject executeAction() throws Exception
/**
* Returns a string representation of this action
*/
@Override
@java.lang.Override
public java.lang.String toString()
{
return "GetApplicationSettings";
Expand Down
4 changes: 2 additions & 2 deletions javasource/scheduler/actions/GetCurrentXASId.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public GetCurrentXASId(IContext context)
super(context);
}

@Override
@java.lang.Override
public java.lang.String executeAction() throws Exception
{
// BEGIN USER CODE
Expand All @@ -31,7 +31,7 @@ public java.lang.String executeAction() throws Exception
/**
* Returns a string representation of this action
*/
@Override
@java.lang.Override
public java.lang.String toString()
{
return "GetCurrentXASId";
Expand Down
55 changes: 55 additions & 0 deletions javasource/scheduler/actions/GetMicroflowNames.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// This file was generated by Mendix Modeler.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
// Special characters, e.g., é, ö, à, etc. are supported in comments.

package scheduler.actions;

import java.util.ArrayList;
import com.mendix.core.Core;
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.webui.CustomJavaAction;
import scheduler.proxies.MicroflowName;
import com.mendix.systemwideinterfaces.core.IMendixObject;

public class GetMicroflowNames extends CustomJavaAction<java.util.List<IMendixObject>>
{
public GetMicroflowNames(IContext context)
{
super(context);
}

@java.lang.Override
public java.util.List<IMendixObject> executeAction() throws Exception
{
// BEGIN USER CODE

ArrayList<IMendixObject> mfList = new ArrayList<IMendixObject>();
for( String mfName : Core.getMicroflowNames() ) {
IMendixObject obj = Core.instantiate(getContext(), MicroflowName.entityName);
obj.setValue(getContext(), MicroflowName.MemberNames.MicroflowName.toString(), mfName);

mfList.add(obj);
}


return mfList;
// END USER CODE
}

/**
* Returns a string representation of this action
*/
@java.lang.Override
public java.lang.String toString()
{
return "GetMicroflowNames";
}

// BEGIN EXTRA CODE
// END EXTRA CODE
}
4 changes: 2 additions & 2 deletions javasource/scheduler/actions/InitializeScheduler.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public InitializeScheduler(IContext context)
super(context);
}

@Override
@java.lang.Override
public java.lang.String executeAction() throws Exception
{
// BEGIN USER CODE
Expand All @@ -33,7 +33,7 @@ public java.lang.String executeAction() throws Exception
/**
* Returns a string representation of this action
*/
@Override
@java.lang.Override
public java.lang.String toString()
{
return "InitializeScheduler";
Expand Down
4 changes: 2 additions & 2 deletions javasource/scheduler/actions/ReleaseAdministrativeLock.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public ReleaseAdministrativeLock(IContext context)
super(context);
}

@Override
@java.lang.Override
public java.lang.Boolean executeAction() throws Exception
{
// BEGIN USER CODE
Expand Down Expand Up @@ -64,7 +64,7 @@ public java.lang.Boolean executeAction() throws Exception
/**
* Returns a string representation of this action
*/
@Override
@java.lang.Override
public java.lang.String toString()
{
return "ReleaseAdministrativeLock";
Expand Down
13 changes: 3 additions & 10 deletions javasource/scheduler/actions/ScheduleAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@

package scheduler.actions;

import org.quartz.JobBuilder;
import org.quartz.JobDetail;
import org.quartz.SimpleScheduleBuilder;
import org.quartz.SimpleTrigger;
import org.quartz.Trigger;
import org.quartz.TriggerBuilder;
import scheduler.impl.ScheduleManager;
import scheduler.impl.ScheduledJob;
import com.mendix.systemwideinterfaces.core.IContext;
import com.mendix.systemwideinterfaces.core.IMendixObject;
import com.mendix.webui.CustomJavaAction;
import scheduler.impl.ScheduleManager;

public class ScheduleAction extends CustomJavaAction<java.lang.Boolean>
{
Expand All @@ -32,7 +25,7 @@ public ScheduleAction(IContext context, IMendixObject ScheduledActionParameter1)
this.__ScheduledActionParameter1 = ScheduledActionParameter1;
}

@Override
@java.lang.Override
public java.lang.Boolean executeAction() throws Exception
{
this.ScheduledActionParameter1 = __ScheduledActionParameter1 == null ? null : scheduler.proxies.ScheduledAction.initialize(getContext(), __ScheduledActionParameter1);
Expand All @@ -48,7 +41,7 @@ public java.lang.Boolean executeAction() throws Exception
/**
* Returns a string representation of this action
*/
@Override
@java.lang.Override
public java.lang.String toString()
{
return "ScheduleAction";
Expand Down
4 changes: 2 additions & 2 deletions javasource/scheduler/actions/ShutdownScheduler.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public ShutdownScheduler(IContext context, java.lang.Boolean WaitForJobsToComple
this.WaitForJobsToComplete = WaitForJobsToComplete;
}

@Override
@java.lang.Override
public java.lang.Boolean executeAction() throws Exception
{
// BEGIN USER CODE
Expand All @@ -37,7 +37,7 @@ public java.lang.Boolean executeAction() throws Exception
/**
* Returns a string representation of this action
*/
@Override
@java.lang.Override
public java.lang.String toString()
{
return "ShutdownScheduler";
Expand Down
4 changes: 2 additions & 2 deletions javasource/scheduler/actions/StopAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public StopAction(IContext context, IMendixObject ScheduledActionParameter1)
this.__ScheduledActionParameter1 = ScheduledActionParameter1;
}

@Override
@java.lang.Override
public java.lang.Boolean executeAction() throws Exception
{
this.ScheduledActionParameter1 = __ScheduledActionParameter1 == null ? null : scheduler.proxies.ScheduledAction.initialize(getContext(), __ScheduledActionParameter1);
Expand All @@ -41,7 +41,7 @@ public java.lang.Boolean executeAction() throws Exception
/**
* Returns a string representation of this action
*/
@Override
@java.lang.Override
public java.lang.String toString()
{
return "StopAction";
Expand Down
10 changes: 4 additions & 6 deletions javasource/scheduler/impl/ScheduleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@ public void updateInfo( ScheduledAction action ) throws CoreException {
this.hasGroupAssignment = true;
}

mxmodelreflection.proxies.Microflows mf = action.getScheduledAction_Microflows();
if ( mf == null )
this.microflowName = action.getMicroflowName();
if ( this.microflowName == null || "".equals(this.microflowName.trim()) )
throw new CoreException("No microflow assigned to action: " + action.getInternalId() + "-" + action.getName());

this.microflowName = mf.getCompleteName();
}


Expand Down Expand Up @@ -200,8 +198,8 @@ public RunningStatus evaluateRunning() throws SchedulerException, CoreException
this.sch.getListenerManager().addJobListener(new MxSchedulerListener());

IContext context = Core.createSystemContext();
List<IMendixObject> result = Core.retrieveXPathQueryEscaped(context, "//%s[%s='%s']", RuntimeInstance.getType(),
RuntimeInstance.MemberNames.XASId.toString(), Core.getXASId());
List<IMendixObject> result = Core.createXPathQuery(String.format("//%s[%s='$xasid']", RuntimeInstance.getType(),
RuntimeInstance.MemberNames.XASId.toString()) ).setVariable("xasid", Core.getXASId()).execute(context);
if ( result.size() > 0 ) {
IMendixObject obj = result.get(0);
obj.setValue(context, RuntimeInstance.MemberNames.RequiresRestart.toString(), false);
Expand Down
4 changes: 2 additions & 2 deletions javasource/test/actions/Sleep.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public Sleep(IContext context, java.lang.Long Millis)
this.Millis = Millis;
}

@Override
@java.lang.Override
public java.lang.Boolean executeAction() throws Exception
{
// BEGIN USER CODE
Expand All @@ -34,7 +34,7 @@ public java.lang.Boolean executeAction() throws Exception
/**
* Returns a string representation of this action
*/
@Override
@java.lang.Override
public java.lang.String toString()
{
return "Sleep";
Expand Down
Loading

0 comments on commit bbec06e

Please sign in to comment.