コード例 #1
0
ファイル: DataService.cs プロジェクト: zaharvsb52/My.MLC.Wms
        public object RunWorkflow(
            JsWorkflowIdentity workflowIdentity,
            JsWorkflowInstanceIdentity workflowInstanceIdentity,
            JObject inArguments,
            string actionCode,
            JObject parameters)
        {
            var inputs = new Dictionary <string, object>();

            if (inArguments != null)
            {
                foreach (var a in inArguments)
                {
                    //TODO: понять как быть с типизацией (пока делаю только string)
                    inputs.Add(a.Key, a.Value.Value <string>());
                }
            }

            var request = new JsWfRequest
            {
                WorkflowIdentity         = workflowIdentity,
                WorkflowInstanceIdentity = workflowInstanceIdentity,
                Action    = actionCode,
                ChangeSet = parameters
            };

            return(_service.Execute(request, inputs));
        }
コード例 #2
0
ファイル: DataService.cs プロジェクト: zaharvsb52/My.MLC.Wms
        public override JsStoreData LoadList(string entityType, int start, int limit, JsFilter[] filter, JsSorter[] sort, string structureName,
                                             JsWorkflowIdentity workflowIdentity, JsWorkflowInstanceIdentity workflowInstanceIdentity)
        {
            var structureDataProvider = StructureDataProviders[structureName];
            var loadListQuery         = QueryDeserializer.DeserializeListQuery(structureDataProvider.RecordStructure, start, limit, filter, sort);

            return(((IListDataLoader)structureDataProvider).LoadList(loadListQuery));
        }
コード例 #3
0
ファイル: DataService.cs プロジェクト: zaharvsb52/My.MLC.Wms
        public object ExecuteWorkflow(
            JsWorkflowIdentity workflowIdentity,
            JsWorkflowInstanceIdentity workflowInstanceIdentity,
            EntityId entityId,
            string actionCode,
            JObject parameters)
        {
            var inputs = entityId == null
                ? new Dictionary <string, object>()
                : new Dictionary <string, object> {
                { "EntityId", entityId.Id }
            };

            var request = new JsWfRequest
            {
                WorkflowIdentity         = workflowIdentity,
                WorkflowInstanceIdentity = workflowInstanceIdentity,
                Action    = actionCode,
                ChangeSet = parameters
            };

            return(_service.Execute(request, inputs));
        }