void ExecuteWorkflowRequestDidFinishWithResult(UPExecuteWorkflowServerOperation sender, UPExecuteWorkflowResult result) { if (result.ChangedRecords.Count > 0) { string outputInfoAreaId = this.FormItem.Options.ValueOrDefault("OutputInfoAreaId") as string; int outputMultiple = Convert.ToInt32(this.FormItem.Options.ValueOrDefault("OutputMultiple")); this.outputValue = string.Empty; if (outputMultiple > 0) { if (!string.IsNullOrEmpty(outputInfoAreaId)) { foreach (string r in result.ChangedRecords) { if (r.InfoAreaId() == outputInfoAreaId) { if (string.IsNullOrEmpty(this.outputValue)) { this.outputValue = r; } else { this.outputValue = this.outputValue + "," + r; } } } } else { this.outputValue = String.Join(",", result.ChangedRecords.ToArray()); } } else if (!string.IsNullOrEmpty(outputInfoAreaId)) { foreach (string r in result.ChangedRecords) { if (r.InfoAreaId() == outputInfoAreaId) { this.outputValue = r; break; } } } else { this.outputValue = result.ChangedRecords[0]; } } else { this.outputValue = string.Empty; } this.ResultMessages = result.Messages; this.Delegate.GroupModelControllerValueChanged(this, this.outputValue); this.ShowFinished(null); }
void PerformWorkflowAction(object sender) { if (this.ignoreAction) { return; } this.ShowWorking(); List <string> records = null; List <object> parameters = this.WorkflowParameters(); string workflowName = this.FormItem.ViewReference.ContextValueForKey("Func3"); string workflowFlags = this.FormItem.Options.ValueOrDefault("Flags") as string; if (string.IsNullOrEmpty(workflowFlags)) { workflowFlags = "768"; } if (!string.IsNullOrEmpty(this.LinkRecordIdentification)) { records = new List <string>() { this.LinkRecordIdentification }; } Dictionary <string, object> additionalRecords = this.ParameterDictionary(); // this.ParameterDictionary()[".links"]; TODO : need to fix foreach (string _recordIdentification in additionalRecords.Values) { if (!_recordIdentification.IsRecordIdentification()) { continue; } if (records == null) { records.Add(_recordIdentification); } else { records.Add(_recordIdentification); } } this.workFlowRequest = new UPExecuteWorkflowServerOperation(workflowName, records, parameters, workflowFlags, this); ServerSession.CurrentSession.ExecuteRequest(this.workFlowRequest); }
void UPExecuteWorkflowRequestDelegate.ExecuteWorkflowRequestDidFinishWithResult(UPExecuteWorkflowServerOperation sender, UPExecuteWorkflowResult result) { throw new NotImplementedException(); }
void UPExecuteWorkflowRequestDelegate.ExecuteWorkflowRequestDidFailWithError(UPExecuteWorkflowServerOperation sender, Exception error) { throw new NotImplementedException(); }
void ExecuteWorkflowRequestDidFailWithError(UPExecuteWorkflowServerOperation sender, Exception error) { this.ShowFinished(error); }