was working on sub process save issue and other ExtJS issue
This commit is contained in:
@@ -5485,6 +5485,8 @@ class processMap {
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
$aDBList = array ();
|
||||||
|
//$aDBList [] = array ('STEP_TITLE' => 'char', 'STEP_UID' => 'char', 'STEP_TYPE_OBJ' => 'char', 'STEP_CONDITION' => 'char', 'STEP_POSITION' => 'integer','STEP_MODE' => 'char','STEP_UID_OBJ' => 'char' );
|
||||||
$sDelimiter = DBAdapter::getStringDelimiter();
|
$sDelimiter = DBAdapter::getStringDelimiter();
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
$oCriteria->addSelectColumn(DbSourcePeer::DBS_UID);
|
$oCriteria->addSelectColumn(DbSourcePeer::DBS_UID);
|
||||||
|
|||||||
@@ -288,6 +288,7 @@ this.canvasGateway.on('contextmenu', function(e) {
|
|||||||
*/
|
*/
|
||||||
MyWorkflow.prototype.AddSubProcessContextMenu=function(_4092)
|
MyWorkflow.prototype.AddSubProcessContextMenu=function(_4092)
|
||||||
{
|
{
|
||||||
|
var taskExtObj = new TaskContext();
|
||||||
this.canvasSubProcess = Ext.get(_4092.id);
|
this.canvasSubProcess = Ext.get(_4092.id);
|
||||||
this.contextSubProcessmenu = new Ext.menu.Menu({
|
this.contextSubProcessmenu = new Ext.menu.Menu({
|
||||||
items: [
|
items: [
|
||||||
@@ -308,7 +309,7 @@ MyWorkflow.prototype.AddSubProcessContextMenu=function(_4092)
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Properties',
|
text: 'Properties',
|
||||||
handler: this.editSubProcessProperties,
|
handler: taskExtObj.editSubProcessProperties,
|
||||||
scope: this
|
scope: this
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
@@ -319,488 +320,6 @@ this.canvasSubProcess.on('contextmenu', function(e) {
|
|||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ExtJs Form of SubProcess Properties
|
|
||||||
* @Param Shape Object
|
|
||||||
* @Author Safan Maredia
|
|
||||||
*/
|
|
||||||
MyWorkflow.prototype.editSubProcessProperties= function(_3525)
|
|
||||||
{
|
|
||||||
var pro_uid = workflow.getUrlVars();
|
|
||||||
var taskId = workflow.currentSelection.id;
|
|
||||||
//Variables Out Grid
|
|
||||||
var subProcessFields = Ext.data.Record.create([
|
|
||||||
{name: 'SP_UID',type: 'string'},
|
|
||||||
{name: 'TAS_UID',type: 'string'},
|
|
||||||
{name: 'PRO_PARENT',type: 'string'},
|
|
||||||
{name: 'TAS_PARENT',type: 'string'},
|
|
||||||
{name: 'SP_SYNCHRONOUS',type: 'string'},
|
|
||||||
{name: 'SPROCESS_NAME',type: 'string'},
|
|
||||||
{name: 'TASKS',type: 'string'},
|
|
||||||
{name: 'TAS_TITLE',type: 'string'},
|
|
||||||
{name: 'CON_VALUE',type: 'string'},
|
|
||||||
{name: 'VAR_OUT1',type: 'string'},
|
|
||||||
{name: 'VAR_OUT2',type: 'string'},
|
|
||||||
{name: 'VAR_IN1',type: 'string'},
|
|
||||||
{name: 'VAR_IN2',type: 'string'}
|
|
||||||
]);
|
|
||||||
|
|
||||||
var editorOut = new Ext.ux.grid.RowEditor({
|
|
||||||
saveText: 'Update'
|
|
||||||
});
|
|
||||||
var editorIn = new Ext.ux.grid.RowEditor({
|
|
||||||
saveText: 'Update'
|
|
||||||
});
|
|
||||||
|
|
||||||
//Variable out grid configuration starts here
|
|
||||||
var btnAddOut = new Ext.Button({
|
|
||||||
id: 'btnAddOut',
|
|
||||||
text: 'Assign Variables Out',
|
|
||||||
iconCls: 'application_add',
|
|
||||||
handler: function(){
|
|
||||||
var e = new subProcessFields({
|
|
||||||
SP_UID : '',
|
|
||||||
PRO_PARENT : '',
|
|
||||||
SP_SYNCHRONOUS : '',
|
|
||||||
TAS_PARENT : '',
|
|
||||||
VAR_OUT1 : '',
|
|
||||||
VAR_OUT2 : ''
|
|
||||||
});
|
|
||||||
|
|
||||||
editorOut.stopEditing();
|
|
||||||
variablesOutStore.insert(0, e);
|
|
||||||
variableOutGrid.getView().refresh();
|
|
||||||
//grid.getSelectionModel().selectRow(0);
|
|
||||||
editorOut.startEditing(0, 0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var btnRemoveOut = new Ext.Button({
|
|
||||||
id: 'btnRemoveOut',
|
|
||||||
text: 'Remove Variables Out',
|
|
||||||
iconCls: 'application_delete',
|
|
||||||
handler: function (s) {
|
|
||||||
editorOut.stopEditing();
|
|
||||||
var s = variableOutGrid.getSelectionModel().getSelections();
|
|
||||||
for(var i = 0, r; r = s[i]; i++){
|
|
||||||
variablesOutStore.remove(r);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var tbOut = new Ext.Toolbar({
|
|
||||||
items: [btnAddOut, btnRemoveOut]
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
//Variable out grid configuration starts here
|
|
||||||
var btnAddIn = new Ext.Button({
|
|
||||||
id: 'btnAddIn',
|
|
||||||
text: 'Assign Variables In',
|
|
||||||
iconCls: 'application_add',
|
|
||||||
handler: function(){
|
|
||||||
var e = new subProcessFields({
|
|
||||||
SP_UID : '',
|
|
||||||
PRO_PARENT : '',
|
|
||||||
SP_SYNCHRONOUS : '',
|
|
||||||
TAS_PARENT : '',
|
|
||||||
VAR_IN1 : '',
|
|
||||||
VAR_IN2 : ''
|
|
||||||
});
|
|
||||||
|
|
||||||
editorIn.stopEditing();
|
|
||||||
variablesInStore.insert(0, e);
|
|
||||||
variableInGrid.getView().refresh();
|
|
||||||
editorIn.startEditing(0, 0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var btnRemoveIn = new Ext.Button({
|
|
||||||
id: 'btnRemoveIn',
|
|
||||||
text: 'Remove Variables In',
|
|
||||||
iconCls: 'application_delete',
|
|
||||||
handler: function (s) {
|
|
||||||
editorIn.stopEditing();
|
|
||||||
var s = variableInGrid.getSelectionModel().getSelections();
|
|
||||||
for(var i = 0, r; r = s[i]; i++){
|
|
||||||
|
|
||||||
|
|
||||||
//Secondly deleting from Grid
|
|
||||||
variablesInStore.remove(r);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var tbIn = new Ext.Toolbar({
|
|
||||||
items: [btnAddIn, btnRemoveIn]
|
|
||||||
});
|
|
||||||
|
|
||||||
// create the Data Store of all Variables Out
|
|
||||||
var variablesOutStore = new Ext.data.JsonStore({
|
|
||||||
root : 'data',
|
|
||||||
totalProperty: 'totalCount',
|
|
||||||
idProperty : 'gridIndex',
|
|
||||||
remoteSort : true,
|
|
||||||
fields : subProcessFields,
|
|
||||||
proxy : new Ext.data.HttpProxy({
|
|
||||||
url : 'proxySubProcessProperties?pid='+pro_uid+'&tid='+taskId+'&type=0' //type=0 specifies Variables Out (Asynchronous)
|
|
||||||
})
|
|
||||||
});
|
|
||||||
variablesOutStore.load();
|
|
||||||
|
|
||||||
// create the Data Store of all Variables In
|
|
||||||
var variablesInStore = new Ext.data.JsonStore({
|
|
||||||
root : 'data',
|
|
||||||
totalProperty: 'totalCount',
|
|
||||||
idProperty : 'gridIndex',
|
|
||||||
remoteSort : true,
|
|
||||||
fields : subProcessFields,
|
|
||||||
proxy : new Ext.data.HttpProxy({
|
|
||||||
url : 'proxySubProcessProperties?pid='+pro_uid+'&tid='+taskId+'&type=1' //type=1 specifies Variables In (Synchronous)
|
|
||||||
})
|
|
||||||
});
|
|
||||||
//taskUsers.setDefaultSort('LABEL', 'asc');
|
|
||||||
variablesInStore.load();
|
|
||||||
|
|
||||||
var variableOutGrid = new Ext.grid.GridPanel({
|
|
||||||
store : variablesOutStore,
|
|
||||||
id : 'mygrid',
|
|
||||||
loadMask : true,
|
|
||||||
loadingText : 'Loading...',
|
|
||||||
renderTo : 'cases-grid',
|
|
||||||
frame : true,
|
|
||||||
autoHeight : true,
|
|
||||||
autoScroll : true,
|
|
||||||
clicksToEdit: 1,
|
|
||||||
layout : 'form',
|
|
||||||
plugins : [editorOut],
|
|
||||||
columns : [{
|
|
||||||
id : 'VAR_OUT1',
|
|
||||||
header : 'Origin',
|
|
||||||
dataIndex: 'VAR_OUT1',
|
|
||||||
width : 200,
|
|
||||||
sortable : true,
|
|
||||||
editor : new Ext.form.TextField({
|
|
||||||
allowBlank: true
|
|
||||||
})
|
|
||||||
},
|
|
||||||
{
|
|
||||||
sortable: false,
|
|
||||||
renderer: function()
|
|
||||||
{
|
|
||||||
return '<input type="button" value="@@" />';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id : 'VAR_OUT2',
|
|
||||||
header : 'Target',
|
|
||||||
dataIndex : 'VAR_OUT2',
|
|
||||||
width : 200,
|
|
||||||
sortable : true,
|
|
||||||
editor : new Ext.form.TextField({
|
|
||||||
allowBlank: true
|
|
||||||
})
|
|
||||||
},
|
|
||||||
{
|
|
||||||
sortable: false,
|
|
||||||
renderer: function()
|
|
||||||
{
|
|
||||||
return '<input type="button" value="@@" />';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
viewConfig: {forceFit: true},
|
|
||||||
stripeRows: true,
|
|
||||||
tbar: tbOut
|
|
||||||
});
|
|
||||||
|
|
||||||
var variableInGrid = new Ext.grid.GridPanel({
|
|
||||||
store : variablesInStore,
|
|
||||||
id : 'mygrid1',
|
|
||||||
loadMask : true,
|
|
||||||
loadingText : 'Loading...',
|
|
||||||
renderTo : 'cases-grid',
|
|
||||||
frame : true,
|
|
||||||
autoHeight : true,
|
|
||||||
autoScroll : true,
|
|
||||||
clicksToEdit: 1,
|
|
||||||
layout : 'form',
|
|
||||||
plugins : [editorIn],
|
|
||||||
columns : [{
|
|
||||||
id : 'VAR_IN1',
|
|
||||||
header : 'Origin',
|
|
||||||
dataIndex: 'VAR_IN1',
|
|
||||||
width : 200,
|
|
||||||
sortable : true,
|
|
||||||
editor : new Ext.form.TextField({
|
|
||||||
allowBlank: true
|
|
||||||
})
|
|
||||||
},
|
|
||||||
{
|
|
||||||
sortable: false,
|
|
||||||
renderer: function()
|
|
||||||
{
|
|
||||||
return '<input type="button" value="@@" />';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id : 'VAR_IN2',
|
|
||||||
header : 'Target',
|
|
||||||
dataIndex : 'VAR_IN2',
|
|
||||||
width : 200,
|
|
||||||
sortable : true,
|
|
||||||
editor : new Ext.form.TextField({
|
|
||||||
allowBlank: true
|
|
||||||
})
|
|
||||||
},
|
|
||||||
{
|
|
||||||
sortable: false,
|
|
||||||
renderer: function()
|
|
||||||
{
|
|
||||||
return '<input type="button" value="@@" />';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
viewConfig: {forceFit: true},
|
|
||||||
stripeRows: true,
|
|
||||||
tbar: tbIn
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
editorOut.on({
|
|
||||||
scope: this,
|
|
||||||
afteredit: function(roweditor, changes, record, rowIndex) {
|
|
||||||
|
|
||||||
|
|
||||||
var sTasks = record.data.TASKS;
|
|
||||||
var sSync = record.data.SP_SYNCHRONOUS;
|
|
||||||
var sSP_UID = record.data.SP_UID;
|
|
||||||
var sProcess_Parent = record.data.PRO_PARENT;
|
|
||||||
var sTask_Parent = record.data.TAS_PARENT;
|
|
||||||
var sVar_Out1 = record.data.VAR_OUT1;
|
|
||||||
var sVar_Out2 = record.data.VAR_OUT2;
|
|
||||||
|
|
||||||
Ext.Ajax.request({
|
|
||||||
url : 'processes_Ajax.php',
|
|
||||||
method: 'POST',
|
|
||||||
params: {
|
|
||||||
action : 'saveSubProcessDetails',
|
|
||||||
TASKS : sTasks,
|
|
||||||
SP_SYNCHRONOUS : sSync,
|
|
||||||
SP_UID : sSP_UID,
|
|
||||||
PRO_PARENT : sProcess_Parent,
|
|
||||||
TAS_PARENT : sTask_Parent,
|
|
||||||
VAR_OUT1 : sVar_Out1,
|
|
||||||
VAR_OUT2 : sVar_Out2
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
Ext.MessageBox.alert ('Status','Variable Out has been saved successfully.');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
editorIn.on({
|
|
||||||
scope: this,
|
|
||||||
afteredit: function(roweditor, changes, record, rowIndex) {
|
|
||||||
|
|
||||||
|
|
||||||
var sTasks = record.data.TASKS;
|
|
||||||
var sSync = record.data.SP_SYNCHRONOUS;
|
|
||||||
var sSP_UID = record.data.SP_UID;
|
|
||||||
var sProcess_Parent = record.data.PRO_PARENT;
|
|
||||||
var sTask_Parent = record.data.TAS_PARENT;
|
|
||||||
var sVar_In1 = record.data.VAR_IN1;
|
|
||||||
var sVar_In2 = record.data.VAR_IN2;
|
|
||||||
|
|
||||||
Ext.Ajax.request({
|
|
||||||
url : 'processes_Ajax.php',
|
|
||||||
method: 'POST',
|
|
||||||
params: {
|
|
||||||
action : 'saveSubProcessDetails',
|
|
||||||
TASKS : sTasks,
|
|
||||||
SP_SYNCHRONOUS : sSync,
|
|
||||||
SP_UID : sSP_UID,
|
|
||||||
PRO_PARENT : sProcess_Parent,
|
|
||||||
TAS_PARENT : sTask_Parent,
|
|
||||||
VAR_IN1 : sVar_In1,
|
|
||||||
VAR_IN2 : sVar_In2
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
Ext.MessageBox.alert ('Status','Variable In has been saved successfully.');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var subProcessProperties = new Ext.FormPanel({
|
|
||||||
labelWidth : 110, // label settings here cascade unless overridden
|
|
||||||
//frame:true,
|
|
||||||
bodyStyle:'padding:5px 5px 0',
|
|
||||||
scope: _3525,
|
|
||||||
items: [
|
|
||||||
{
|
|
||||||
xtype:'fieldset',
|
|
||||||
title: 'Sub-Process',
|
|
||||||
collapsible: false,
|
|
||||||
autoHeight:true,
|
|
||||||
//width: 600,
|
|
||||||
defaultType: 'textfield',
|
|
||||||
items:[
|
|
||||||
{
|
|
||||||
id: 'subProcessName',
|
|
||||||
xtype: 'textfield',
|
|
||||||
width: 350,
|
|
||||||
fieldLabel: 'SubProcess name',
|
|
||||||
name : 'SPROCESS_NAME',
|
|
||||||
allowBlank: false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
width: 300,
|
|
||||||
xtype: 'combo',
|
|
||||||
mode: 'local',
|
|
||||||
triggerAction: 'all',
|
|
||||||
forceSelection: true,
|
|
||||||
editable: false,
|
|
||||||
fieldLabel: 'Process',
|
|
||||||
name: 'process',
|
|
||||||
emptyText : 'Select Process',
|
|
||||||
displayField: 'PROCESSES',
|
|
||||||
valueField: 'PROCESSES',
|
|
||||||
store: variablesOutStore
|
|
||||||
},
|
|
||||||
{
|
|
||||||
width: 150,
|
|
||||||
id : 'spType',
|
|
||||||
xtype: 'combo',
|
|
||||||
mode: 'local',
|
|
||||||
triggerAction: 'all',
|
|
||||||
forceSelection: true,
|
|
||||||
editable: false,
|
|
||||||
fieldLabel: 'Type',
|
|
||||||
name: 'SP_SYNCHRONOUS',
|
|
||||||
hiddenName: 'SP_SYNCHRONOUS',
|
|
||||||
displayField: 'name',
|
|
||||||
valueField: 'value',
|
|
||||||
emptyText : 'Select Type',
|
|
||||||
store: new Ext.data.JsonStore({
|
|
||||||
fields : ['name', 'value'],
|
|
||||||
data : [
|
|
||||||
{name : 'Asynchronous', value: 'Asynchronous'},
|
|
||||||
{name : 'Synchronous', value: 'Synchronous'},
|
|
||||||
]
|
|
||||||
}),
|
|
||||||
onSelect: function(record, index){
|
|
||||||
if(record.data.name == 'Synchronous')
|
|
||||||
Ext.getCmp("variablein").show();
|
|
||||||
else
|
|
||||||
Ext.getCmp("variablein").hide();
|
|
||||||
|
|
||||||
this.setValue(record.data[this.valueField || this.displayField]);
|
|
||||||
this.collapse();
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id :'variableout',
|
|
||||||
xtype:'fieldset',
|
|
||||||
title: 'Variables Out',
|
|
||||||
collapsible: false,
|
|
||||||
labelAlign: 'top',
|
|
||||||
items:[variableOutGrid]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id :'variablein',
|
|
||||||
xtype:'fieldset',
|
|
||||||
title: 'Variables In',
|
|
||||||
//hidden: true,
|
|
||||||
collapsible: false,
|
|
||||||
labelAlign: 'top',
|
|
||||||
items:[variableInGrid]
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
|
|
||||||
//Loading Task Details into the form
|
|
||||||
subProcessProperties.form.load({
|
|
||||||
url:'proxySubProcessProperties?pid='+pro_uid+'&tid='+taskId+'&type=2',
|
|
||||||
method:'GET',
|
|
||||||
//waitMsg:'Loading',
|
|
||||||
success:function(form, action) {
|
|
||||||
Ext.getCmp("subProcessName").setValue(action.result.data[0].TAS_TITLE);
|
|
||||||
if(action.result.data[0].SP_SYNCHRONOUS == 0)
|
|
||||||
{
|
|
||||||
Ext.getCmp("variablein").hide();
|
|
||||||
Ext.getCmp("spType").setValue("Asynchronous");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Ext.getCmp("variablein").show();
|
|
||||||
Ext.getCmp("spType").setValue("Synchronous");
|
|
||||||
}
|
|
||||||
workflow.subProcessProperties = action.result.data[0];
|
|
||||||
},
|
|
||||||
failure:function(form, action) {
|
|
||||||
Ext.MessageBox.alert('Message', 'Load failed');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
subProcessProperties.render(document.body);
|
|
||||||
// workflow.subProcessProperties = subProcessProperties;
|
|
||||||
|
|
||||||
var window = new Ext.Window({
|
|
||||||
title: 'Task: ',
|
|
||||||
collapsible: false,
|
|
||||||
maximizable: false,
|
|
||||||
width: 800,
|
|
||||||
height: 500,
|
|
||||||
minWidth: 300,
|
|
||||||
minHeight: 150,
|
|
||||||
layout: 'fit',
|
|
||||||
plain: true,
|
|
||||||
bodyStyle: 'padding:5px;',
|
|
||||||
buttonAlign: 'center',
|
|
||||||
items: subProcessProperties,
|
|
||||||
buttons: [{
|
|
||||||
text: 'Save',
|
|
||||||
handler: function(){
|
|
||||||
var getForm = subProcessProperties.getForm().getValues();
|
|
||||||
var sTask_Parent = workflow.subProcessProperties.TAS_PARENT;
|
|
||||||
var sSPNAME = getForm.SPROCESS_NAME;
|
|
||||||
Ext.Ajax.request({
|
|
||||||
url : 'processes_Ajax.php',
|
|
||||||
method: 'POST',
|
|
||||||
params: {
|
|
||||||
action : 'subprocessProperties',
|
|
||||||
TAS_PARENT : sTask_Parent,
|
|
||||||
SPROCESS_NAME : sSPNAME
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
Ext.MessageBox.alert ('Status','Sub Process Properties has been saved successfully.');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
workflow.currentSelection.bpmnNewText.clear();
|
|
||||||
workflow.currentSelection.bpmnNewText.drawStringRect(sSPNAME,20,20,100,'left');
|
|
||||||
workflow.currentSelection.bpmnNewText.paint();
|
|
||||||
workflow.currentSelection.subProcessName = sSPNAME;
|
|
||||||
//var getstore = taskPropertiesTabs.getStore();
|
|
||||||
//var getData = getstore.data.items;
|
|
||||||
//taskExtObj.saveTaskProperties(_5625);
|
|
||||||
}
|
|
||||||
},{
|
|
||||||
text: 'Cancel',
|
|
||||||
handler: function(){
|
|
||||||
// when this button clicked,
|
|
||||||
window.close();
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
window.show();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//Window pop up function when user clicks on Gateways properties
|
//Window pop up function when user clicks on Gateways properties
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
|
|||||||
url: 'proxyExtjs?action=getAdditionalTables'
|
url: 'proxyExtjs?action=getAdditionalTables'
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
//additionalTables.load();
|
additionalTables.load();
|
||||||
|
|
||||||
//Creating store for getting list of Fields of additional PM tables
|
//Creating store for getting list of Fields of additional PM tables
|
||||||
var TablesFields = Ext.data.Record.create([
|
var TablesFields = Ext.data.Record.create([
|
||||||
@@ -224,7 +224,7 @@ ProcessOptions.prototype.addDynaform= function(_5625)
|
|||||||
sortable: false,
|
sortable: false,
|
||||||
renderer: function(val, meta, record)
|
renderer: function(val, meta, record)
|
||||||
{
|
{
|
||||||
return String.format("<input type='submit' name='UID' value='UID' onclick='renderInstall()'>",record.data.DYN_UID);
|
return String.format("<input type='submit' name='UID' value='UID' onclick=''>",record.data.DYN_UID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -240,22 +240,18 @@ ProcessOptions.prototype.addDynaform= function(_5625)
|
|||||||
width: 200,
|
width: 200,
|
||||||
editable: false,
|
editable: false,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
editor: {
|
editor: new Ext.form.TextField({
|
||||||
xtype: 'textfield',
|
allowBlank: false
|
||||||
//allowBlank: false,
|
})
|
||||||
name : 'FLD_NAME'
|
|
||||||
}
|
|
||||||
},{
|
},{
|
||||||
id: 'PRO_VARIABLE',
|
id: 'PRO_VARIABLE',
|
||||||
header: 'Variables',
|
header: 'Variables',
|
||||||
dataIndex: 'PRO_VARIABLE',
|
dataIndex: 'PRO_VARIABLE',
|
||||||
width: 200,
|
width: 200,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
editor: {
|
editor: new Ext.form.TextField({
|
||||||
xtype: 'textfield',
|
allowBlank: false
|
||||||
// allowBlank: false,
|
})
|
||||||
name : 'PRO_VARIABLE'
|
|
||||||
}
|
|
||||||
},{
|
},{
|
||||||
sortable: false,
|
sortable: false,
|
||||||
renderer: function(val){return '<input type="button" value="@@" id="'+val+'"/>';}
|
renderer: function(val){return '<input type="button" value="@@" id="'+val+'"/>';}
|
||||||
@@ -321,13 +317,13 @@ ProcessOptions.prototype.addDynaform= function(_5625)
|
|||||||
change: function(radiogroup, radio) {
|
change: function(radiogroup, radio) {
|
||||||
if(radio.inputValue == 'blankDyna')
|
if(radio.inputValue == 'blankDyna')
|
||||||
{
|
{
|
||||||
Ext.get("blankDynaform").show();
|
Ext.getCmp("blankDynaform").show();
|
||||||
Ext.get("pmTableDynaform").hide();
|
Ext.getCmp("pmTableDynaform").hide();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Ext.get("blankDynaform").hide();
|
Ext.getCmp("blankDynaform").hide();
|
||||||
Ext.get("pmTableDynaform").show();
|
Ext.getCmp("pmTableDynaform").show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -385,11 +381,11 @@ ProcessOptions.prototype.addDynaform= function(_5625)
|
|||||||
width: 150,
|
width: 150,
|
||||||
xtype: 'combo',
|
xtype: 'combo',
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
editable: false,
|
editable: true,
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
forceSelection: true,
|
forceSelection: true,
|
||||||
fieldLabel: 'Create from a PM Table',
|
fieldLabel: 'Create from a PM Table',
|
||||||
//name: 'ADD_TABLE',
|
emptyText : 'Select Table',
|
||||||
displayField: 'ADD_TAB_NAME',
|
displayField: 'ADD_TAB_NAME',
|
||||||
valueField: 'ADD_TAB_UID',
|
valueField: 'ADD_TAB_UID',
|
||||||
value : '---------------------------',
|
value : '---------------------------',
|
||||||
@@ -426,16 +422,17 @@ ProcessOptions.prototype.addDynaform= function(_5625)
|
|||||||
xtype: 'grid',
|
xtype: 'grid',
|
||||||
id:'fieldsGrid',
|
id:'fieldsGrid',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
ds: tablesFieldsStore,
|
store: tablesFieldsStore,
|
||||||
cm: addTableColumns,
|
cm: addTableColumns,
|
||||||
width: 550,
|
width: 550,
|
||||||
//height: 300,
|
//height: 300,
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
|
clicksToEdit: 1,
|
||||||
plugins: [editor],
|
plugins: [editor],
|
||||||
//loadMask : true,
|
//loadMask : true,
|
||||||
loadingText : 'Loading...',
|
loadingText : 'Loading...',
|
||||||
border: true,
|
border: false
|
||||||
renderTo : Ext.getBody()
|
//renderTo : Ext.getBody()
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -554,8 +551,9 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
text: 'New',
|
text: 'New',
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_add',
|
iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||||
handler: function () {
|
handler: function () {
|
||||||
formWindow.show();
|
|
||||||
dbconnForm.getForm().reset();
|
dbconnForm.getForm().reset();
|
||||||
|
formWindow.show();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -710,6 +708,7 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
//allowBlank:false,
|
//allowBlank:false,
|
||||||
width:450,
|
width:450,
|
||||||
frame:true,
|
frame:true,
|
||||||
|
autoDestroy : true,
|
||||||
monitorValid : true,
|
monitorValid : true,
|
||||||
plain: true,
|
plain: true,
|
||||||
bodyStyle: 'padding:5px;',
|
bodyStyle: 'padding:5px;',
|
||||||
@@ -725,9 +724,10 @@ ProcessOptions.prototype.dbConnection = function()
|
|||||||
forceSelection: true,
|
forceSelection: true,
|
||||||
name: 'DBS_TYPE',
|
name: 'DBS_TYPE',
|
||||||
displayField: 'name',
|
displayField: 'name',
|
||||||
//emptyText : 'Select Format',
|
emptyText : 'Select Format',
|
||||||
valueField : 'value',
|
valueField : 'value',
|
||||||
value : 'Select',
|
allowBlank: false,
|
||||||
|
//value : 'Select',
|
||||||
store: new Ext.data.JsonStore({
|
store: new Ext.data.JsonStore({
|
||||||
fields : ['name', 'value'],
|
fields : ['name', 'value'],
|
||||||
data : [
|
data : [
|
||||||
|
|||||||
@@ -713,7 +713,7 @@ TaskContext.prototype.editTaskProperties= function()
|
|||||||
var taskId = workflow.currentSelection.id;
|
var taskId = workflow.currentSelection.id;
|
||||||
|
|
||||||
// create the Data Store for processes
|
// create the Data Store for processes
|
||||||
var taskDetails = new Ext.data.JsonStore({
|
/*var taskDetails = new Ext.data.JsonStore({
|
||||||
root : 'data',
|
root : 'data',
|
||||||
totalProperty: 'totalCount',
|
totalProperty: 'totalCount',
|
||||||
idProperty : 'gridIndex',
|
idProperty : 'gridIndex',
|
||||||
@@ -722,9 +722,9 @@ TaskContext.prototype.editTaskProperties= function()
|
|||||||
proxy: new Ext.data.HttpProxy({
|
proxy: new Ext.data.HttpProxy({
|
||||||
url: 'proxyExtjs?tid='+taskId+'&action=getPropertiesList'
|
url: 'proxyExtjs?tid='+taskId+'&action=getPropertiesList'
|
||||||
})
|
})
|
||||||
});
|
});*/
|
||||||
//taskUsers.setDefaultSort('LABEL', 'asc');
|
//taskUsers.setDefaultSort('LABEL', 'asc');
|
||||||
taskDetails.load();
|
//taskDetails.load();
|
||||||
|
|
||||||
|
|
||||||
var taskPropertiesTabs = new Ext.FormPanel({
|
var taskPropertiesTabs = new Ext.FormPanel({
|
||||||
@@ -775,7 +775,7 @@ TaskContext.prototype.editTaskProperties= function()
|
|||||||
border:false,
|
border:false,
|
||||||
items: [{
|
items: [{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
id: 'priorityVariable',
|
//id: 'priorityVariable',
|
||||||
fieldLabel: 'Variable for Case priority',
|
fieldLabel: 'Variable for Case priority',
|
||||||
name: 'TAS_PRIORITY_VARIABLE',
|
name: 'TAS_PRIORITY_VARIABLE',
|
||||||
anchor:'100%'
|
anchor:'100%'
|
||||||
@@ -823,7 +823,8 @@ TaskContext.prototype.editTaskProperties= function()
|
|||||||
id: 'BALANCED',
|
id: 'BALANCED',
|
||||||
name: 'TAS_ASSIGN_TYPE',
|
name: 'TAS_ASSIGN_TYPE',
|
||||||
inputValue: 'BALANCED',
|
inputValue: 'BALANCED',
|
||||||
checked: false
|
checked: false,
|
||||||
|
listeners: {'check':{fn: function(){Ext.getCmp("staticMI").hide();Ext.getCmp("cancelMI").hide();Ext.getCmp("evaluate").hide();}}}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -831,7 +832,8 @@ TaskContext.prototype.editTaskProperties= function()
|
|||||||
id: 'MANUAL',
|
id: 'MANUAL',
|
||||||
name: 'TAS_ASSIGN_TYPE',
|
name: 'TAS_ASSIGN_TYPE',
|
||||||
inputValue: 'MANUAL',
|
inputValue: 'MANUAL',
|
||||||
checked:false
|
checked:false,
|
||||||
|
listeners: {'check':{fn: function(){Ext.getCmp("staticMI").hide();Ext.getCmp("cancelMI").hide();Ext.getCmp("evaluate").hide();}}}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -856,14 +858,16 @@ TaskContext.prototype.editTaskProperties= function()
|
|||||||
id:'REPORT_TO',
|
id:'REPORT_TO',
|
||||||
name: 'TAS_ASSIGN_TYPE',
|
name: 'TAS_ASSIGN_TYPE',
|
||||||
inputValue: 'REPORT_TO',
|
inputValue: 'REPORT_TO',
|
||||||
checked:false
|
checked:false,
|
||||||
|
listeners: {'check':{fn: function(){Ext.getCmp("staticMI").hide();Ext.getCmp("cancelMI").hide();Ext.getCmp("evaluate").hide();}}}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
boxLabel: 'Self Service',
|
boxLabel: 'Self Service',
|
||||||
id:'SELF_SERVICE',
|
id:'SELF_SERVICE',
|
||||||
name: 'TAS_ASSIGN_TYPE',
|
name: 'TAS_ASSIGN_TYPE',
|
||||||
inputValue: 'SELF_SERVICE',
|
inputValue: 'SELF_SERVICE',
|
||||||
checked:false
|
checked:false,
|
||||||
|
listeners: {'check':{fn: function(){Ext.getCmp("staticMI").hide();Ext.getCmp("cancelMI").hide();Ext.getCmp("evaluate").hide();}}}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -1084,12 +1088,12 @@ TaskContext.prototype.editTaskProperties= function()
|
|||||||
data : [
|
data : [
|
||||||
{
|
{
|
||||||
name : 'Work Days',
|
name : 'Work Days',
|
||||||
value: 'Work Days'
|
value: '1'
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name : 'Calendar Days',
|
name : 'Calendar Days',
|
||||||
value: 'Calendar Days'
|
value: '2'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
@@ -2069,3 +2073,486 @@ TaskContext.prototype.editUsersAdHoc= function()
|
|||||||
});
|
});
|
||||||
window.show();
|
window.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ExtJs Form of SubProcess Properties
|
||||||
|
* @Param Shape Object
|
||||||
|
* @Author Safan Maredia
|
||||||
|
*/
|
||||||
|
TaskContext.prototype.editSubProcessProperties= function(_3525)
|
||||||
|
{
|
||||||
|
var pro_uid = workflow.getUrlVars();
|
||||||
|
var taskId = workflow.currentSelection.id;
|
||||||
|
//Variables Out Grid
|
||||||
|
var subProcessFields = Ext.data.Record.create([
|
||||||
|
{name: 'SP_UID',type: 'string'},
|
||||||
|
{name: 'TAS_UID',type: 'string'},
|
||||||
|
{name: 'PRO_PARENT',type: 'string'},
|
||||||
|
{name: 'TAS_PARENT',type: 'string'},
|
||||||
|
{name: 'SP_SYNCHRONOUS',type: 'string'},
|
||||||
|
{name: 'SPROCESS_NAME',type: 'string'},
|
||||||
|
{name: 'TASKS',type: 'string'},
|
||||||
|
{name: 'TAS_TITLE',type: 'string'},
|
||||||
|
{name: 'CON_VALUE',type: 'string'},
|
||||||
|
{name: 'VAR_OUT1',type: 'string'},
|
||||||
|
{name: 'VAR_OUT2',type: 'string'},
|
||||||
|
{name: 'VAR_IN1',type: 'string'},
|
||||||
|
{name: 'VAR_IN2',type: 'string'}
|
||||||
|
]);
|
||||||
|
|
||||||
|
var editorOut = new Ext.ux.grid.RowEditor({
|
||||||
|
saveText: 'Update'
|
||||||
|
});
|
||||||
|
var editorIn = new Ext.ux.grid.RowEditor({
|
||||||
|
saveText: 'Update'
|
||||||
|
});
|
||||||
|
|
||||||
|
//Variable out grid configuration starts here
|
||||||
|
var btnAddOut = new Ext.Button({
|
||||||
|
id: 'btnAddOut',
|
||||||
|
text: 'Assign Variables Out',
|
||||||
|
iconCls: 'application_add',
|
||||||
|
handler: function(){
|
||||||
|
var e = new subProcessFields({
|
||||||
|
SP_UID : '',
|
||||||
|
PRO_PARENT : '',
|
||||||
|
SP_SYNCHRONOUS : '',
|
||||||
|
TAS_PARENT : '',
|
||||||
|
VAR_OUT1 : '',
|
||||||
|
VAR_OUT2 : ''
|
||||||
|
});
|
||||||
|
|
||||||
|
editorOut.stopEditing();
|
||||||
|
variablesOutStore.insert(0, e);
|
||||||
|
variableOutGrid.getView().refresh();
|
||||||
|
//grid.getSelectionModel().selectRow(0);
|
||||||
|
editorOut.startEditing(0, 0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var btnRemoveOut = new Ext.Button({
|
||||||
|
id: 'btnRemoveOut',
|
||||||
|
text: 'Remove Variables Out',
|
||||||
|
iconCls: 'application_delete',
|
||||||
|
handler: function (s) {
|
||||||
|
editorOut.stopEditing();
|
||||||
|
var s = variableOutGrid.getSelectionModel().getSelections();
|
||||||
|
for(var i = 0, r; r = s[i]; i++){
|
||||||
|
variablesOutStore.remove(r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var tbOut = new Ext.Toolbar({
|
||||||
|
items: [btnAddOut, btnRemoveOut]
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//Variable out grid configuration starts here
|
||||||
|
var btnAddIn = new Ext.Button({
|
||||||
|
id: 'btnAddIn',
|
||||||
|
text: 'Assign Variables In',
|
||||||
|
iconCls: 'application_add',
|
||||||
|
handler: function(){
|
||||||
|
var e = new subProcessFields({
|
||||||
|
SP_UID : '',
|
||||||
|
PRO_PARENT : '',
|
||||||
|
SP_SYNCHRONOUS : '',
|
||||||
|
TAS_PARENT : '',
|
||||||
|
VAR_IN1 : '',
|
||||||
|
VAR_IN2 : ''
|
||||||
|
});
|
||||||
|
|
||||||
|
editorIn.stopEditing();
|
||||||
|
variablesInStore.insert(0, e);
|
||||||
|
variableInGrid.getView().refresh();
|
||||||
|
editorIn.startEditing(0, 0);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var btnRemoveIn = new Ext.Button({
|
||||||
|
id: 'btnRemoveIn',
|
||||||
|
text: 'Remove Variables In',
|
||||||
|
iconCls: 'application_delete',
|
||||||
|
handler: function (s) {
|
||||||
|
editorIn.stopEditing();
|
||||||
|
var s = variableInGrid.getSelectionModel().getSelections();
|
||||||
|
for(var i = 0, r; r = s[i]; i++){
|
||||||
|
|
||||||
|
|
||||||
|
//Secondly deleting from Grid
|
||||||
|
variablesInStore.remove(r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var tbIn = new Ext.Toolbar({
|
||||||
|
items: [btnAddIn, btnRemoveIn]
|
||||||
|
});
|
||||||
|
|
||||||
|
// create the Data Store of all Variables Out
|
||||||
|
var variablesOutStore = new Ext.data.JsonStore({
|
||||||
|
root : 'data',
|
||||||
|
totalProperty: 'totalCount',
|
||||||
|
idProperty : 'gridIndex',
|
||||||
|
remoteSort : true,
|
||||||
|
fields : subProcessFields,
|
||||||
|
proxy : new Ext.data.HttpProxy({
|
||||||
|
url : 'proxySubProcessProperties?pid='+pro_uid+'&tid='+taskId+'&type=0' //type=0 specifies Variables Out (Asynchronous)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
variablesOutStore.load();
|
||||||
|
|
||||||
|
// create the Data Store of all Variables In
|
||||||
|
var variablesInStore = new Ext.data.JsonStore({
|
||||||
|
root : 'data',
|
||||||
|
totalProperty: 'totalCount',
|
||||||
|
idProperty : 'gridIndex',
|
||||||
|
remoteSort : true,
|
||||||
|
fields : subProcessFields,
|
||||||
|
proxy : new Ext.data.HttpProxy({
|
||||||
|
url : 'proxySubProcessProperties?pid='+pro_uid+'&tid='+taskId+'&type=1' //type=1 specifies Variables In (Synchronous)
|
||||||
|
})
|
||||||
|
});
|
||||||
|
//taskUsers.setDefaultSort('LABEL', 'asc');
|
||||||
|
variablesInStore.load();
|
||||||
|
|
||||||
|
var variableOutGrid = new Ext.grid.GridPanel({
|
||||||
|
store : variablesOutStore,
|
||||||
|
id : 'mygrid',
|
||||||
|
loadMask : true,
|
||||||
|
loadingText : 'Loading...',
|
||||||
|
renderTo : 'cases-grid',
|
||||||
|
frame : true,
|
||||||
|
autoHeight : true,
|
||||||
|
autoScroll : true,
|
||||||
|
clicksToEdit: 1,
|
||||||
|
layout : 'form',
|
||||||
|
plugins : [editorOut],
|
||||||
|
columns : [{
|
||||||
|
id : 'VAR_OUT1',
|
||||||
|
header : 'Origin',
|
||||||
|
dataIndex: 'VAR_OUT1',
|
||||||
|
width : 200,
|
||||||
|
sortable : true,
|
||||||
|
editor : new Ext.form.TextField({
|
||||||
|
allowBlank: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sortable: false,
|
||||||
|
renderer: function()
|
||||||
|
{
|
||||||
|
return '<input type="button" value="@@" />';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id : 'VAR_OUT2',
|
||||||
|
header : 'Target',
|
||||||
|
dataIndex : 'VAR_OUT2',
|
||||||
|
width : 200,
|
||||||
|
sortable : true,
|
||||||
|
editor : new Ext.form.TextField({
|
||||||
|
allowBlank: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sortable: false,
|
||||||
|
renderer: function()
|
||||||
|
{
|
||||||
|
return '<input type="button" value="@@" />';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
viewConfig: {forceFit: true},
|
||||||
|
stripeRows: true,
|
||||||
|
tbar: tbOut
|
||||||
|
});
|
||||||
|
|
||||||
|
var variableInGrid = new Ext.grid.GridPanel({
|
||||||
|
store : variablesInStore,
|
||||||
|
id : 'mygrid1',
|
||||||
|
loadMask : true,
|
||||||
|
loadingText : 'Loading...',
|
||||||
|
renderTo : 'cases-grid',
|
||||||
|
frame : true,
|
||||||
|
autoHeight : true,
|
||||||
|
autoScroll : true,
|
||||||
|
clicksToEdit: 1,
|
||||||
|
layout : 'form',
|
||||||
|
plugins : [editorIn],
|
||||||
|
columns : [{
|
||||||
|
id : 'VAR_IN1',
|
||||||
|
header : 'Origin',
|
||||||
|
dataIndex: 'VAR_IN1',
|
||||||
|
width : 200,
|
||||||
|
sortable : true,
|
||||||
|
editor : new Ext.form.TextField({
|
||||||
|
allowBlank: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sortable: false,
|
||||||
|
renderer: function()
|
||||||
|
{
|
||||||
|
return '<input type="button" value="@@" />';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id : 'VAR_IN2',
|
||||||
|
header : 'Target',
|
||||||
|
dataIndex : 'VAR_IN2',
|
||||||
|
width : 200,
|
||||||
|
sortable : true,
|
||||||
|
editor : new Ext.form.TextField({
|
||||||
|
allowBlank: true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
sortable: false,
|
||||||
|
renderer: function()
|
||||||
|
{
|
||||||
|
return '<input type="button" value="@@" />';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
viewConfig: {forceFit: true},
|
||||||
|
stripeRows: true,
|
||||||
|
tbar: tbIn
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
editorOut.on({
|
||||||
|
scope: this,
|
||||||
|
afteredit: function(roweditor, changes, record, rowIndex) {
|
||||||
|
|
||||||
|
|
||||||
|
var sTasks = record.data.TASKS;
|
||||||
|
var sSync = record.data.SP_SYNCHRONOUS;
|
||||||
|
var sSP_UID = record.data.SP_UID;
|
||||||
|
var sProcess_Parent = record.data.PRO_PARENT;
|
||||||
|
var sTask_Parent = record.data.TAS_PARENT;
|
||||||
|
var sVar_Out1 = record.data.VAR_OUT1;
|
||||||
|
var sVar_Out2 = record.data.VAR_OUT2;
|
||||||
|
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url : 'processes_Ajax.php',
|
||||||
|
method: 'POST',
|
||||||
|
params: {
|
||||||
|
action : 'saveSubProcessDetails',
|
||||||
|
TASKS : sTasks,
|
||||||
|
SP_SYNCHRONOUS : sSync,
|
||||||
|
SP_UID : sSP_UID,
|
||||||
|
PRO_PARENT : sProcess_Parent,
|
||||||
|
TAS_PARENT : sTask_Parent,
|
||||||
|
VAR_OUT1 : sVar_Out1,
|
||||||
|
VAR_OUT2 : sVar_Out2
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
Ext.MessageBox.alert ('Status','Variable Out has been saved successfully.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
editorIn.on({
|
||||||
|
scope: this,
|
||||||
|
afteredit: function(roweditor, changes, record, rowIndex) {
|
||||||
|
|
||||||
|
|
||||||
|
var sTasks = record.data.TASKS;
|
||||||
|
var sSync = record.data.SP_SYNCHRONOUS;
|
||||||
|
var sSP_UID = record.data.SP_UID;
|
||||||
|
var sProcess_Parent = record.data.PRO_PARENT;
|
||||||
|
var sTask_Parent = record.data.TAS_PARENT;
|
||||||
|
var sVar_In1 = record.data.VAR_IN1;
|
||||||
|
var sVar_In2 = record.data.VAR_IN2;
|
||||||
|
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url : 'processes_Ajax.php',
|
||||||
|
method: 'POST',
|
||||||
|
params: {
|
||||||
|
action : 'saveSubProcessDetails',
|
||||||
|
TASKS : sTasks,
|
||||||
|
SP_SYNCHRONOUS : sSync,
|
||||||
|
SP_UID : sSP_UID,
|
||||||
|
PRO_PARENT : sProcess_Parent,
|
||||||
|
TAS_PARENT : sTask_Parent,
|
||||||
|
VAR_IN1 : sVar_In1,
|
||||||
|
VAR_IN2 : sVar_In2
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
Ext.MessageBox.alert ('Status','Variable In has been saved successfully.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var subProcessProperties = new Ext.FormPanel({
|
||||||
|
labelWidth : 110, // label settings here cascade unless overridden
|
||||||
|
//frame:true,
|
||||||
|
bodyStyle:'padding:5px 5px 0',
|
||||||
|
scope: _3525,
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
xtype:'fieldset',
|
||||||
|
title: 'Sub-Process',
|
||||||
|
collapsible: false,
|
||||||
|
autoHeight:true,
|
||||||
|
//width: 600,
|
||||||
|
defaultType: 'textfield',
|
||||||
|
items:[
|
||||||
|
{
|
||||||
|
id: 'subProcessName',
|
||||||
|
xtype: 'textfield',
|
||||||
|
width: 350,
|
||||||
|
fieldLabel: 'SubProcess name',
|
||||||
|
name : 'SPROCESS_NAME',
|
||||||
|
allowBlank: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
width: 300,
|
||||||
|
xtype: 'combo',
|
||||||
|
mode: 'local',
|
||||||
|
triggerAction: 'all',
|
||||||
|
forceSelection: true,
|
||||||
|
editable: false,
|
||||||
|
fieldLabel: 'Process',
|
||||||
|
name: 'process',
|
||||||
|
emptyText : 'Select Process',
|
||||||
|
displayField: 'PROCESSES',
|
||||||
|
valueField: 'PROCESSES',
|
||||||
|
store: variablesOutStore
|
||||||
|
},
|
||||||
|
{
|
||||||
|
width: 150,
|
||||||
|
id : 'spType',
|
||||||
|
xtype: 'combo',
|
||||||
|
mode: 'local',
|
||||||
|
triggerAction: 'all',
|
||||||
|
forceSelection: true,
|
||||||
|
editable: false,
|
||||||
|
fieldLabel: 'Type',
|
||||||
|
name: 'SP_SYNCHRONOUS',
|
||||||
|
hiddenName: 'SP_SYNCHRONOUS',
|
||||||
|
displayField: 'name',
|
||||||
|
valueField: 'value',
|
||||||
|
emptyText : 'Select Type',
|
||||||
|
store: new Ext.data.JsonStore({
|
||||||
|
fields : ['name', 'value'],
|
||||||
|
data : [
|
||||||
|
{name : 'Asynchronous', value: 'Asynchronous'},
|
||||||
|
{name : 'Synchronous', value: 'Synchronous'},
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
onSelect: function(record, index){
|
||||||
|
if(record.data.name == 'Synchronous')
|
||||||
|
Ext.getCmp("variablein").show();
|
||||||
|
else
|
||||||
|
Ext.getCmp("variablein").hide();
|
||||||
|
|
||||||
|
this.setValue(record.data[this.valueField || this.displayField]);
|
||||||
|
this.collapse();
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id :'variableout',
|
||||||
|
xtype:'fieldset',
|
||||||
|
title: 'Variables Out',
|
||||||
|
collapsible: false,
|
||||||
|
labelAlign: 'top',
|
||||||
|
items:[variableOutGrid]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id :'variablein',
|
||||||
|
xtype:'fieldset',
|
||||||
|
title: 'Variables In',
|
||||||
|
//hidden: true,
|
||||||
|
collapsible: false,
|
||||||
|
labelAlign: 'top',
|
||||||
|
items:[variableInGrid]
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
|
||||||
|
//Loading Task Details into the form
|
||||||
|
subProcessProperties.form.load({
|
||||||
|
url:'proxySubProcessProperties?pid='+pro_uid+'&tid='+taskId+'&type=2',
|
||||||
|
method:'GET',
|
||||||
|
//waitMsg:'Loading',
|
||||||
|
success:function(form, action) {
|
||||||
|
Ext.getCmp("subProcessName").setValue(action.result.data[0].TAS_TITLE);
|
||||||
|
if(action.result.data[0].SP_SYNCHRONOUS == 0)
|
||||||
|
{
|
||||||
|
Ext.getCmp("variablein").hide();
|
||||||
|
Ext.getCmp("spType").setValue("Asynchronous");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Ext.getCmp("variablein").show();
|
||||||
|
Ext.getCmp("spType").setValue("Synchronous");
|
||||||
|
}
|
||||||
|
workflow.subProcessProperties = action.result.data[0];
|
||||||
|
},
|
||||||
|
failure:function(form, action) {
|
||||||
|
Ext.MessageBox.alert('Message', 'Load failed');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
subProcessProperties.render(document.body);
|
||||||
|
// workflow.subProcessProperties = subProcessProperties;
|
||||||
|
|
||||||
|
var window = new Ext.Window({
|
||||||
|
title: 'Task: ',
|
||||||
|
collapsible: false,
|
||||||
|
maximizable: false,
|
||||||
|
width: 800,
|
||||||
|
height: 500,
|
||||||
|
minWidth: 300,
|
||||||
|
minHeight: 150,
|
||||||
|
layout: 'fit',
|
||||||
|
plain: true,
|
||||||
|
bodyStyle: 'padding:5px;',
|
||||||
|
buttonAlign: 'center',
|
||||||
|
items: subProcessProperties,
|
||||||
|
buttons: [{
|
||||||
|
text: 'Save',
|
||||||
|
handler: function(){
|
||||||
|
var getForm = subProcessProperties.getForm().getValues();
|
||||||
|
var sTask_Parent = workflow.subProcessProperties.TAS_PARENT;
|
||||||
|
var sSPNAME = getForm.SPROCESS_NAME;
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url : 'processes_Ajax.php',
|
||||||
|
method: 'POST',
|
||||||
|
params: {
|
||||||
|
action : 'subprocessProperties',
|
||||||
|
TAS_PARENT : sTask_Parent,
|
||||||
|
SPROCESS_NAME : sSPNAME
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
Ext.MessageBox.alert ('Status','Sub Process Properties has been saved successfully.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
workflow.currentSelection.bpmnNewText.clear();
|
||||||
|
workflow.currentSelection.bpmnNewText.drawStringRect(sSPNAME,20,20,100,'left');
|
||||||
|
workflow.currentSelection.bpmnNewText.paint();
|
||||||
|
workflow.currentSelection.subProcessName = sSPNAME;
|
||||||
|
//var getstore = taskPropertiesTabs.getStore();
|
||||||
|
//var getData = getstore.data.items;
|
||||||
|
//taskExtObj.saveTaskProperties(_5625);
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
text: 'Cancel',
|
||||||
|
handler: function(){
|
||||||
|
// when this button clicked,
|
||||||
|
window.close();
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
window.show();
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user