示例#1
0
        public override void Execute()
        {
            try
            {
                _processName = ActionInParameterManager["ProcessName"].GetValueInString();
                var resourceDictionaryName = ActionInParameterManager["SubProcessResources"].GetValueInString();
                _process = (Process)ResourceManager.GetResource(_processName);
                var selectedResource = (DictionaryParameter <string>)ActionInParameterManager.GetDictionaryParam("ParameterDictionary");

                if (_process != null)
                {
                    _startTime = DateTime.Now;
                    Log.Debug($"开始调用其他Process:{_processName}");


                    ProcessManagement.CallProcessActionRunInstance(_process, new ResourceDicModel <string>
                    {
                        ResourceDictionaryName = resourceDictionaryName, DictionaryParameter = selectedResource
                    });
                }
                else
                {
                    Log.Error($"调用其他Process:{_processName}出错ProcessName名字可能错误");
                }
            }
            catch (Exception ex)
            {
                Log.Error($"调用其他Process:{_processName}出错{ex}");
            }
        }