icon="icons/processes.gif"
restorable="true">
</view>
- <!--
- <view
- id="org.argeo.slc.client.ui.executionModulesView"
- class="org.argeo.eclipse.spring.SpringExtensionFactory"
- icon="icons/execution_module.gif"
- name="Execution Modules"
- restorable="true">
- </view>
- <view
- class="org.argeo.eclipse.spring.SpringExtensionFactory"
- icon="icons/results.gif"
- id="org.argeo.slc.client.ui.resultListView"
- name="Results"
- restorable="true">
- </view>
- <view
- allowMultiple="true"
- class="org.argeo.eclipse.spring.SpringExtensionFactory"
- icon="icons/result_details.gif"
- id="org.argeo.slc.client.ui.resultDetailView"
- name="Result details"
- restorable="true">
- </view>
- <view
- id="org.argeo.slc.client.ui.processListView"
- class="org.argeo.eclipse.spring.SpringExtensionFactory"
- name="Processes"
- icon="icons/processes.gif"
- restorable="true">
- </view>
- <view
- allowMultiple="true"
- class="org.argeo.eclipse.spring.SpringExtensionFactory"
- icon="icons/process_details.gif"
- id="org.argeo.slc.client.ui.processDetailView"
- name="Process details"
- restorable="true">
- </view>
- <view
- class="org.argeo.eclipse.spring.SpringExtensionFactory"
- icon="icons/edit_parameters.gif"
- id="org.argeo.slc.client.ui.processParametersView"
- name="Process Parameters"
- restorable="true">
- </view>
- <view
- class="org.argeo.eclipse.spring.SpringExtensionFactory"
- icon="icons/batch.gif"
- id="org.argeo.slc.client.ui.processBuilderView"
- name="Batch"
- restorable="true">
- </view>
- -->
</extension>
<!-- Commands definitions -->
name="Refresh type">
</commandParameter>
</command>
- <!--
- <command
- defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
- id="org.argeo.slc.client.ui.runSlc/Flow"
- name="org.argeo.slc.demo.minimal:hello">
- </command>
- -->
- <!-- Result List
- <command
- defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
- id="org.argeo.slc.client.ui.refreshResultList"
- name="Refresh Result List">
- </command>
- <command
- defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
- id="org.argeo.slc.client.ui.removeSelectedResultFromResultList"
- name="Remove selected results from list">
- </command>
- <command
- defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
- id="org.argeo.slc.client.ui.displayResultDetails"
- name="Display Result Details">
- </command>
- -->
- <!-- Execution Modules
- <command
- defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
- id="org.argeo.slc.client.ui.refreshExecutionModulesView"
- name="Refresh Execution Modules View">
- </command>
- -->
- <!-- Batch
- <command
- defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
- id="org.argeo.slc.client.ui.launchBatch"
- name="Launch Batch">
- </command>
- <command
- defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
- id="org.argeo.slc.client.ui.removeSelectedFromBatch"
- name="Remove Selected From Batch">
- </command>
- <command
- defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
- id="org.argeo.slc.client.ui.clearBatch"
- name="Clear Batch">
- </command>
- -->
- <!-- Process List
- <command
- defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
- id="org.argeo.slc.client.ui.refreshProcessList"
- name="Refresh Process List ">
- </command>
- <command
- defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
- id="org.argeo.slc.client.ui.displayProcessDetails"
- name="DisplayProcessDetails">
- <commandParameter
- id="org.argeo.slc.client.commands.processUuid"
- name="Process UUID">
- </commandParameter>
- </command>
- <command
- defaultHandler="org.argeo.eclipse.spring.SpringCommandHandler"
- id="org.argeo.slc.client.ui.manageBundles"
- name="Manage Bundles">
- </command>
- -->
</extension>
<!-- Menu definitions -->
label="Update module"
tooltip="Update module">
</command>
- <!--
- <command
- commandId="org.argeo.slc.client.ui.runSlc/Flow"
- icon="icons/launch.gif"
- label="Run SLC Flow"
- tooltip="Run SLC Flow">
- </command>
- -->
- </menuContribution>
- <!--
- <menuContribution
- locationURI="menu:fileMenu">
- </menuContribution>
- <menuContribution
- locationURI="toolbar:org.argeo.slc.client.ui.resultListView">
- <command
- commandId="org.argeo.slc.client.ui.refreshResultList"
- icon="icons/refresh.png"
- label="Refresh result list"
- tooltip="Refresh the result list">
- </command>
- <command
- commandId="org.argeo.slc.client.ui.removeSelectedResultFromResultList"
- icon="icons/removeAll.png"
- label="Remove selected"
- tooltip="Remove selected items from the result list (Also on server side, cannot be undone)">
- </command>
- </menuContribution>
- <menuContribution
- locationURI="toolbar:org.argeo.slc.client.ui.executionModulesView">
- <command
- commandId="org.argeo.slc.client.ui.refreshExecutionModulesView"
- icon="icons/refresh.png"
- label="Refresh execution modules"
- tooltip="Refresh the execution modules view.">
- </command>
</menuContribution>
- <menuContribution
- locationURI="toolbar:org.argeo.slc.client.ui.processBuilderView">
- <command
- commandId="org.argeo.slc.client.ui.launchBatch"
- icon="icons/launch.gif"
- label="Launch Batch"
- tooltip="Launch the batch built in the process builder view.">
- </command>
- <command
- commandId="org.argeo.slc.client.ui.clearBatch"
- label="Clear Batch"
- icon="icons/clear_batch.gif"
- tooltip="Clear the batch built in the process builder view.">
- </command>
- <command
- commandId="org.argeo.slc.client.ui.removeSelectedFromBatch"
- icon="icons/remove_one.gif"
- label="Remove Selected From Batch"
- tooltip="Remove selected process from process builder view.">
- </command>
- </menuContribution>
- -->
</extension>
<extension
point="org.eclipse.ui.perspectives">
.hasNext();) {
Node flowNode = nit.nextNode();
children.add(flowNode);
- try {
- // make sure modules are started for all nodes
- String flowDefPath = flowNode.getNode(SLC_ADDRESS)
- .getProperty(Property.JCR_PATH).getString();
- Node executionModuleNode = flowNode.getSession()
- .getNode(SlcJcrUtils.modulePath(flowDefPath));
- if (!executionModuleNode.getProperty(SLC_STARTED)
- .getBoolean())
- ClientUiPlugin.startStopExecutionModule(
- modulesManager, executionModuleNode);
- } catch (Exception e) {
- ErrorFeedback.show(
- "Cannot start execution module related to "
- + flowNode, e);
- }
-
}
return children.toArray();
} catch (RepositoryException e) {
}
static class FlowsLabelProvider extends ColumnLabelProvider {
-
@Override
public String getText(Object element) {
Node node = (Node) element;
if (node.hasNode(SLC_ADDRESS)) {
String path = node.getNode(SLC_ADDRESS)
.getProperty(Property.JCR_PATH).getString();
- Node executionModuleNode = node.getSession().getNode(
- SlcJcrUtils.modulePath(path));
- String executionModuleName = executionModuleNode
- .getProperty(SLC_NAME).getString();
+ String executionModuleName = SlcJcrUtils
+ .moduleName(path);
+ // Node executionModuleNode = node.getSession().getNode(
+ // SlcJcrUtils.modulePath(path));
+ // String executionModuleName = executionModuleNode
+ // .getProperty(SLC_NAME).getString();
return executionModuleName + ":"
+ SlcJcrUtils.flowRelativePath(path);
}
import javax.jcr.Node;
import javax.jcr.NodeIterator;
+import javax.jcr.Property;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
} catch (RepositoryException e) {
throw new SlcException("Cannot update status of " + processNode, e);
}
+
+ // save
doSave(null);
+
try {
+ // make sure modules are started for all nodes
+ for (NodeIterator nit = processNode.getNode(SLC_FLOW).getNodes(); nit
+ .hasNext();) {
+ Node flowNode = nit.nextNode();
+ try {
+ String flowDefPath = flowNode.getNode(SLC_ADDRESS)
+ .getProperty(Property.JCR_PATH).getString();
+ Node executionModuleNode = flowNode.getSession().getNode(
+ SlcJcrUtils.modulePath(flowDefPath));
+ if (!executionModuleNode.getProperty(SLC_STARTED)
+ .getBoolean())
+ ClientUiPlugin.startStopExecutionModule(modulesManager,
+ executionModuleNode);
+ } catch (Exception e) {
+ ErrorFeedback.show(
+ "Cannot start execution module related to "
+ + flowNode, e);
+ }
+ }
+
+ // Actually process
ExecutionProcess process = processController.process(processNode);
Map<String, String> properties = new HashMap<String, String>();
properties.put(ExecutionModulesManager.SLC_PROCESS_ID,