mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 18:22:11 +08:00
删除workflowengine.net
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Web.UI.WebControls;
|
||||
using Infrastructure;
|
||||
using LeaRun.Util.WebControl;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.App.SSO;
|
||||
using OpenAuth.Domain;
|
||||
using OpenAuth.Domain.Service;
|
||||
|
||||
@@ -149,10 +150,15 @@ namespace OpenAuth.Mvc.Areas.FlowManage.Controllers
|
||||
wfFlowInfoBLL.UpdateState(keyValue, State);
|
||||
return Content("操作成功。");
|
||||
}
|
||||
|
||||
public string Load(int pageCurrent = 1, int pageSize = 30)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(wfFlowInfoBLL.Load(pageCurrent, pageSize));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取权限数据
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 用户列表树
|
||||
/// </summary>
|
||||
|
@@ -1,4 +1,61 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<!-- #section:basics/content.breadcrumbs -->
|
||||
<div class="breadcrumbs" id="breadcrumbs">
|
||||
<ul class="breadcrumb">
|
||||
<li>
|
||||
<i class="ace-icon fa fa-home home-icon"></i>
|
||||
<a href="#">申请管理</a>
|
||||
</li>
|
||||
<li class="active">列表</li>
|
||||
</ul><!-- /.breadcrumb -->
|
||||
</div>
|
||||
|
||||
<!-- /section:basics/content.breadcrumbs -->
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-3">
|
||||
<div class="widget-box widget-color-blue">
|
||||
<div class="widget-header">
|
||||
</div>
|
||||
<div class="widget-body">
|
||||
<div class="widget-main">
|
||||
<ul id="orgtree" class="ztree" style="width: 100%"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="widget-box widget-color-blue">
|
||||
<div class="widget-header">
|
||||
@Html.Action("MenuHeader", "Home", new {area=""})
|
||||
</div>
|
||||
<div class="widget-body gridwidth">
|
||||
<div class="widget-main">
|
||||
<div class="row">
|
||||
<div class="col-md-12 ">
|
||||
<table id="maingrid"></table>
|
||||
<div id="grid-pager"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.page-content -->
|
||||
|
||||
<script src="~/BllScripts/grid.js"></script>
|
||||
<script src="~/BllScripts/flowDesign.js"></script>
|
||||
<script src="~/BllScripts/jqEvent.js"></script>
|
||||
|
||||
|
||||
|
||||
@{
|
||||
ViewBag.Title = "流程设计管理";
|
||||
Layout = "~/Views/Shared/_LayoutIndex.cshtml";
|
||||
}
|
||||
|
122
OpenAuth.Mvc/BllScripts/flowDesign.js
Normal file
122
OpenAuth.Mvc/BllScripts/flowDesign.js
Normal file
@@ -0,0 +1,122 @@
|
||||
//grid列表模块
|
||||
function MainGrid() {
|
||||
var url = '/workflowschemas/Load';
|
||||
this.maingrid = $('#maingrid')
|
||||
.jqGrid({
|
||||
colModel: [
|
||||
{ label: '主键', name: 'id', hidden: true },
|
||||
{ label: '流程编号', name: 'schemecode', index: 'schemecode', width: 100, align: 'left' },
|
||||
{ label: '流程名称', name: 'schemename', index: 'schemename', width: 150, align: 'left' },
|
||||
{
|
||||
label: "表单类型", name: "frmtype", index: "frmtype", width: 80, align: "left",
|
||||
formatter: function (cellvalue, options, rowObject) {
|
||||
return (cellvalue == 1 ? '系统表单' : '自定义表单')
|
||||
}
|
||||
},
|
||||
{ label: '模板版本', name: 'schemeversion', index: 'schemeversion', width: 180, align: 'left' },
|
||||
{ label: '状态Id', name: 'enabledmark', index: 'enabledmark', hidden: true },
|
||||
{
|
||||
label: "状态", name: "enabledmarklabel", index: "enabledmarklabel", width: 50, align: "center",
|
||||
formatter: function (cellvalue, options, rowObject) {
|
||||
if (rowObject.enabledmark == 1) {
|
||||
return '<span class=\"label label-success\">启用</span>';
|
||||
} else if (rowObject.enabledmark == 0) {
|
||||
return '<span class=\"label label-danger\">停用</span>';
|
||||
} else {
|
||||
return '<span class=\"label label-info\">草稿</span>';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{ label: "最近编辑用户", name: "modifyusername", index: "modifyusername", width: 90, align: "left" },
|
||||
{
|
||||
label: "最近编辑时间", name: "modifydate", index: "modifydate", width: 150, align: "left",
|
||||
formatter: function (cellvalue, options, rowObject) {
|
||||
return formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
|
||||
}
|
||||
},
|
||||
{ label: "创建用户", name: "createusername", index: "createusername", width: 80, align: "left" },
|
||||
{
|
||||
label: "创建时间", name: "createdate", index: "createdate", width: 150, align: "left",
|
||||
formatter: function (cellvalue, options, rowObject) {
|
||||
return formatDate(cellvalue, 'yyyy-MM-dd hh:mm:ss');
|
||||
}
|
||||
},
|
||||
|
||||
{ label: "备注", name: "description", index: "description", width: 200, align: "left" }
|
||||
|
||||
],
|
||||
url: url,
|
||||
datatype: "json",
|
||||
|
||||
viewrecords: true,
|
||||
rowNum: 18,
|
||||
pager: "#grid-pager",
|
||||
altRows: true,
|
||||
height: 'auto',
|
||||
multiselect: true,
|
||||
multiboxonly: true,
|
||||
|
||||
loadComplete: function () {
|
||||
var table = this;
|
||||
setTimeout(function () {
|
||||
updatePagerIcons(table);
|
||||
},
|
||||
0);
|
||||
}
|
||||
}).jqGrid('navGrid', "#grid-pager", {
|
||||
edit: false, add: false, del: false, refresh: false, search: false
|
||||
});
|
||||
|
||||
this.reload = function (id) {
|
||||
this.maingrid.jqGrid("setGridParam", { url: url })
|
||||
.trigger("reloadGrid", [{ page: 1 }]); //重载JQGrid
|
||||
|
||||
};
|
||||
};
|
||||
MainGrid.prototype = new Grid();
|
||||
var list = new MainGrid();
|
||||
var vm = new Vue({
|
||||
el: '#editDlg'
|
||||
});
|
||||
|
||||
//删除
|
||||
function del() {
|
||||
list.del("Code", "/WorkflowSchemas/Del", function () {
|
||||
list.reload();
|
||||
});
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
function edit() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
title:selected.Code,
|
||||
skin: 'layui-layer-rim', //加上边框
|
||||
area: ['800px', '600px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
content: '/designer/index?schemeName=' + selected.Code
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
skin: 'layui-layer-rim', //加上边框
|
||||
area: ['800px', '600px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
content: '/designer/index?schemeName=',
|
||||
end: function() {
|
||||
list.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,92 +0,0 @@
|
||||
//grid列表模块
|
||||
function MainGrid() {
|
||||
var url = '/workflowschemas/Load';
|
||||
this.maingrid = $('#maingrid')
|
||||
.jqGrid({
|
||||
colModel: [
|
||||
{
|
||||
name: 'Id',
|
||||
index: 'Id',
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
index: 'Code',
|
||||
name: 'Code',
|
||||
label: '模板名称'
|
||||
}
|
||||
|
||||
],
|
||||
url: url,
|
||||
datatype: "json",
|
||||
|
||||
viewrecords: true,
|
||||
rowNum: 18,
|
||||
pager: "#grid-pager",
|
||||
altRows: true,
|
||||
height: 'auto',
|
||||
multiselect: true,
|
||||
multiboxonly: true,
|
||||
|
||||
loadComplete: function () {
|
||||
var table = this;
|
||||
setTimeout(function () {
|
||||
updatePagerIcons(table);
|
||||
},
|
||||
0);
|
||||
}
|
||||
}).jqGrid('navGrid', "#grid-pager", {
|
||||
edit: false, add: false, del: false, refresh: false, search: false
|
||||
});
|
||||
|
||||
this.reload = function (id) {
|
||||
this.maingrid.jqGrid("setGridParam", { url: url })
|
||||
.trigger("reloadGrid", [{ page: 1 }]); //重载JQGrid
|
||||
|
||||
};
|
||||
};
|
||||
MainGrid.prototype = new Grid();
|
||||
var list = new MainGrid();
|
||||
var vm = new Vue({
|
||||
el: '#editDlg'
|
||||
});
|
||||
|
||||
//删除
|
||||
function del() {
|
||||
list.del("Code", "/WorkflowSchemas/Del", function () {
|
||||
list.reload();
|
||||
});
|
||||
}
|
||||
|
||||
//自定义的编辑按钮
|
||||
function edit() {
|
||||
var selected = list.getSelectedObj();
|
||||
if (selected == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
layer.open({
|
||||
type: 2,
|
||||
title:selected.Code,
|
||||
skin: 'layui-layer-rim', //加上边框
|
||||
area: ['800px', '600px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
content: '/designer/index?schemeName=' + selected.Code
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function add() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
skin: 'layui-layer-rim', //加上边框
|
||||
area: ['800px', '600px'], //宽高
|
||||
maxmin: true, //开启最大化最小化按钮
|
||||
content: '/designer/index?schemeName=',
|
||||
end: function() {
|
||||
list.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,56 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
using System.Xml.Linq;
|
||||
using OpenAuth.Mvc.Models;
|
||||
using OptimaJet.Workflow;
|
||||
using OptimaJet.Workflow.Core.Builder;
|
||||
using OptimaJet.Workflow.Core.Bus;
|
||||
using OptimaJet.Workflow.Core.Runtime;
|
||||
using OptimaJet.Workflow.DbPersistence;
|
||||
using WorkflowRuntime = OptimaJet.Workflow.Core.Runtime.WorkflowRuntime;
|
||||
|
||||
namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
public class DesignerController : BaseController
|
||||
{
|
||||
public ActionResult Index(string schemeName)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult API()
|
||||
{
|
||||
Stream filestream = null;
|
||||
if (Request.Files.Count > 0)
|
||||
filestream = Request.Files[0].InputStream;
|
||||
|
||||
var pars = new NameValueCollection();
|
||||
pars.Add(Request.Params);
|
||||
|
||||
if (Request.HttpMethod.Equals("POST", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
var parsKeys = pars.AllKeys;
|
||||
foreach (var key in Request.Form.AllKeys)
|
||||
{
|
||||
if (!parsKeys.Contains(key))
|
||||
{
|
||||
pars.Add(Request.Form);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var res = WorkflowInit.Runtime.DesignerAPI(pars, filestream, true);
|
||||
if (pars["operation"].ToLower() == "downloadscheme")
|
||||
return File(Encoding.UTF8.GetBytes(res), "text/xml", "scheme.xml");
|
||||
return Content(res);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,45 +0,0 @@
|
||||
using System;
|
||||
using System.Web.Mvc;
|
||||
using Infrastructure;
|
||||
using OpenAuth.App;
|
||||
|
||||
namespace OpenAuth.Mvc.Controllers
|
||||
{
|
||||
public class WorkflowSchemasController : BaseController
|
||||
{
|
||||
private WorkflowSchemasManagerApp _app;
|
||||
|
||||
public WorkflowSchemasController()
|
||||
{
|
||||
_app = AutofacExt.GetFromFac<WorkflowSchemasManagerApp>();
|
||||
}
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public string Load(int pageCurrent = 1, int pageSize = 30)
|
||||
{
|
||||
return JsonHelper.Instance.Serialize(_app.Load(pageCurrent, pageSize));
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public string Del(string[] ids)
|
||||
{
|
||||
try
|
||||
{
|
||||
_app.Del(ids);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Result.Status = false;
|
||||
Result.Message = e.Message;
|
||||
}
|
||||
|
||||
return JsonHelper.Instance.Serialize(Result);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,45 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OptimaJet.Workflow.Core.Cache;
|
||||
using OptimaJet.Workflow.Core.Model;
|
||||
|
||||
namespace OpenAuth.Mvc.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 流程定义的缓存
|
||||
/// <para>李玉宝新增于2016-09-28 17:15:45</para>
|
||||
/// </summary>
|
||||
public sealed class DefaultParcedProcessCache : IParsedProcessCache
|
||||
{
|
||||
private Dictionary<Guid, ProcessDefinition> _cache;
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
_cache.Clear();
|
||||
}
|
||||
|
||||
public ProcessDefinition GetProcessDefinitionBySchemeId(Guid schemeId)
|
||||
{
|
||||
if (_cache == null)
|
||||
return null;
|
||||
if (_cache.ContainsKey(schemeId))
|
||||
return _cache[schemeId];
|
||||
return null;
|
||||
}
|
||||
|
||||
public void AddProcessDefinition(Guid schemeId, ProcessDefinition processDefinition)
|
||||
{
|
||||
if (_cache == null)
|
||||
{
|
||||
_cache = new Dictionary<Guid, ProcessDefinition> {{schemeId, processDefinition}};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_cache.ContainsKey(schemeId))
|
||||
_cache[schemeId] = processDefinition;
|
||||
else
|
||||
_cache.Add(schemeId, processDefinition);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,146 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity.Validation;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.Domain;
|
||||
using OptimaJet.Workflow.Core.Model;
|
||||
using OptimaJet.Workflow.Core.Runtime;
|
||||
|
||||
namespace OpenAuth.Mvc.Models
|
||||
{
|
||||
public class WorkflowActionProvider :IWorkflowActionProvider
|
||||
{
|
||||
private ModuleManagerApp _app;
|
||||
|
||||
public WorkflowActionProvider()
|
||||
{
|
||||
_app = AutofacExt.GetFromFac<ModuleManagerApp>();
|
||||
}
|
||||
public void ExecuteAction(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter)
|
||||
{
|
||||
if (_actions.ContainsKey(name))
|
||||
{
|
||||
_actions[name].Invoke(processInstance, actionParameter);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ExecuteCondition(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<string> GetActions()
|
||||
{
|
||||
return _actions.Keys.ToList();
|
||||
}
|
||||
|
||||
private static Dictionary<string, Action<ProcessInstance, string>> _actions = new Dictionary
|
||||
<string, Action<ProcessInstance, string>>
|
||||
{
|
||||
{"创建流程记录", WriteTransitionHistory}, //仅用于PreExecution,创建流程初始转换列表
|
||||
{"更新流程记录", UpdateTransitionHistory}
|
||||
};
|
||||
|
||||
private static ApplyTransitionHistoryApp _applyTransitionHistoryApp = AutofacExt.GetFromFac<ApplyTransitionHistoryApp>();
|
||||
|
||||
public static void WriteTransitionHistory(ProcessInstance processInstance, string parameter)
|
||||
{
|
||||
if (processInstance.IdentityIds == null)
|
||||
return;
|
||||
|
||||
var currentstate = WorkflowInit.Runtime.GetLocalizedStateName(processInstance.ProcessId, processInstance.CurrentState);
|
||||
|
||||
var nextState = WorkflowInit.Runtime.GetLocalizedStateName(processInstance.ProcessId, processInstance.ExecutedActivityState);
|
||||
|
||||
var command = WorkflowInit.Runtime.GetLocalizedCommandName(processInstance.ProcessId, processInstance.CurrentCommand);
|
||||
|
||||
|
||||
var historyItem = new ApplyTransitionHistory
|
||||
{
|
||||
Id = Guid.NewGuid(),
|
||||
AllowedToUserNames = GetEmployeesString(processInstance.IdentityIds),
|
||||
DestinationState = nextState,
|
||||
ApplyId = processInstance.ProcessId,
|
||||
InitialState = currentstate,
|
||||
Command = command
|
||||
};
|
||||
_applyTransitionHistoryApp.Add(historyItem);
|
||||
|
||||
}
|
||||
|
||||
private static string GetEmployeesString(IEnumerable<string> identities)
|
||||
{
|
||||
var identitiesGuid = identities.Select(c => new Guid(c));
|
||||
var app = AutofacExt.GetFromFac<UserManagerApp>();
|
||||
|
||||
var employees = app.GetUsers(identitiesGuid);
|
||||
|
||||
var sb = new StringBuilder();
|
||||
bool isFirst = true;
|
||||
foreach (var employee in employees)
|
||||
{
|
||||
if (!isFirst)
|
||||
sb.Append(",");
|
||||
isFirst = false;
|
||||
|
||||
sb.Append(employee.Name);
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
public static void UpdateTransitionHistory(ProcessInstance processInstance, string parameter)
|
||||
{
|
||||
var currentstate = WorkflowInit.Runtime.GetLocalizedStateName(processInstance.ProcessId, processInstance.CurrentState);
|
||||
|
||||
var nextState = WorkflowInit.Runtime.GetLocalizedStateName(processInstance.ProcessId, processInstance.ExecutedActivityState);
|
||||
|
||||
var command = WorkflowInit.Runtime.GetLocalizedCommandName(processInstance.ProcessId, processInstance.CurrentCommand);
|
||||
|
||||
var isTimer = !string.IsNullOrEmpty(processInstance.ExecutedTimer);
|
||||
|
||||
var historyItem = _applyTransitionHistoryApp.Get(processInstance.ProcessId, currentstate, nextState);
|
||||
|
||||
if (historyItem == null)
|
||||
{
|
||||
historyItem = new ApplyTransitionHistory()
|
||||
{
|
||||
Id = Guid.NewGuid(),
|
||||
AllowedToUserNames = string.Empty,
|
||||
DestinationState = nextState,
|
||||
ApplyId = processInstance.ProcessId,
|
||||
InitialState = currentstate
|
||||
};
|
||||
|
||||
_applyTransitionHistoryApp.Add(historyItem);
|
||||
|
||||
}
|
||||
|
||||
historyItem.Command = !isTimer ? command : string.Format("Timer: {0}", processInstance.ExecutedTimer);
|
||||
historyItem.TransitionTime = DateTime.Now;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(processInstance.IdentityId))
|
||||
historyItem.UserId = null;
|
||||
else
|
||||
historyItem.UserId = new Guid(processInstance.IdentityId);
|
||||
|
||||
try
|
||||
{
|
||||
_applyTransitionHistoryApp.Update(historyItem);
|
||||
}
|
||||
catch (DbEntityValidationException e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal static void DeleteEmptyPreHistory(Guid processId)
|
||||
{
|
||||
_applyTransitionHistoryApp.DeleteByProcess(processId);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,110 +0,0 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Xml.Linq;
|
||||
using OpenAuth.App;
|
||||
using OpenAuth.Domain;
|
||||
using OptimaJet.Workflow.Core.Builder;
|
||||
using OptimaJet.Workflow.Core.Bus;
|
||||
using OptimaJet.Workflow.Core.Persistence;
|
||||
using OptimaJet.Workflow.Core.Runtime;
|
||||
using OptimaJet.Workflow.DbPersistence;
|
||||
|
||||
namespace OpenAuth.Mvc.Models
|
||||
{
|
||||
public static class WorkflowInit
|
||||
{
|
||||
private static volatile WorkflowRuntime _runtime;
|
||||
private static readonly object _sync = new object();
|
||||
|
||||
public static WorkflowRuntime Runtime
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_runtime == null)
|
||||
{
|
||||
lock (_sync)
|
||||
{
|
||||
if (_runtime == null)
|
||||
{
|
||||
var connectionString = ConfigurationManager.ConnectionStrings["WorkFlow"].ConnectionString;
|
||||
var builder = new WorkflowBuilder<XElement>(
|
||||
new MSSQLProvider(connectionString),
|
||||
new OptimaJet.Workflow.Core.Parser.XmlWorkflowParser(),
|
||||
new MSSQLProvider(connectionString)
|
||||
);
|
||||
builder.SetCache(new DefaultParcedProcessCache());
|
||||
|
||||
_runtime = new WorkflowRuntime(new Guid("{8D38DB8F-F3D5-4F26-A989-4FDD40F32D9D}"))
|
||||
.WithBuilder(builder)
|
||||
.WithRuleProvider(new WorkflowRuleProvider())
|
||||
.WithActionProvider(new WorkflowActionProvider())
|
||||
.WithPersistenceProvider(new MSSQLProvider(connectionString))
|
||||
.WithTimerManager(new TimerManager())
|
||||
.WithBus(new NullBus())
|
||||
.SwitchAutoUpdateSchemeBeforeGetAvailableCommandsOn()
|
||||
.Start();
|
||||
_runtime.ProcessStatusChanged += _runtime_ProcessStatusChanged;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return _runtime;
|
||||
}
|
||||
}
|
||||
|
||||
private static void _runtime_ProcessStatusChanged(object sender, ProcessStatusChangedEventArgs e)
|
||||
{
|
||||
if (e.NewStatus != ProcessStatus.Idled && e.NewStatus != ProcessStatus.Finalized)
|
||||
return;
|
||||
|
||||
if (string.IsNullOrEmpty(e.SchemeCode))
|
||||
return;
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬ת<CCAC><D7AA><EFBFBD><EFBFBD>¼
|
||||
WorkflowActionProvider.DeleteEmptyPreHistory(e.ProcessId);
|
||||
_runtime.PreExecuteFromCurrentActivity(e.ProcessId);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>֪ͨ<CDA8>б<EFBFBD>
|
||||
UpdateInbox(e);
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
|
||||
UpdateApplyState(e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬
|
||||
/// </summary>
|
||||
private static void UpdateApplyState(ProcessStatusChangedEventArgs e)
|
||||
{
|
||||
var nextState = WorkflowInit.Runtime.GetLocalizedStateName(e.ProcessId, e.ProcessInstance.CurrentState);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD><EFBFBD>֪ͨ<CDA8>б<EFBFBD>
|
||||
/// </summary>
|
||||
private static void UpdateInbox(ProcessStatusChangedEventArgs e)
|
||||
{
|
||||
var inboxApp = AutofacExt.GetFromFac<WorkflowInboxApp>();
|
||||
inboxApp.DeleteAllByProcess(e.ProcessId);
|
||||
|
||||
if (e.NewStatus != ProcessStatus.Finalized)
|
||||
{
|
||||
var newActors = Runtime.GetAllActorsForDirectCommandTransitions(e.ProcessId);
|
||||
foreach (var newActor in newActors)
|
||||
{
|
||||
var newInboxItem = new Relevance()
|
||||
{
|
||||
Id = Guid.NewGuid(),
|
||||
SecondId = new Guid(newActor),
|
||||
FirstId = e.ProcessId,
|
||||
Key = "ProcessUser"
|
||||
};
|
||||
|
||||
inboxApp.Add(newInboxItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,65 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenAuth.App;
|
||||
using OptimaJet.Workflow.Core.Model;
|
||||
using OptimaJet.Workflow.Core.Runtime;
|
||||
|
||||
namespace OpenAuth.Mvc.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 流程角色处理
|
||||
/// </summary>
|
||||
public class WorkflowRuleProvider : IWorkflowRuleProvider
|
||||
{
|
||||
private RoleManagerApp _app;
|
||||
|
||||
public WorkflowRuleProvider()
|
||||
{
|
||||
_app = AutofacExt.GetFromFac<RoleManagerApp>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载角色列表,供流程设计的时候进行选择
|
||||
/// </summary>
|
||||
public List<string> GetRules()
|
||||
{
|
||||
var roles = _app.Load(Guid.Empty, 1, 100).rows;
|
||||
var rolestrs = new List<string>();
|
||||
foreach (var role in roles)
|
||||
{
|
||||
rolestrs.Add(role.Name);
|
||||
}
|
||||
return rolestrs;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks the specified process instance.
|
||||
/// <para>李玉宝于2016-09-05 16:43:07</para>
|
||||
/// </summary>
|
||||
/// <param name="processInstance">The process instance.</param>
|
||||
/// <param name="runtime">The runtime.</param>
|
||||
/// <param name="identityId">用户ID</param>
|
||||
/// <param name="ruleName">Name of the rule.</param>
|
||||
/// <param name="parameter">The parameter.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
public bool Check(ProcessInstance processInstance, WorkflowRuntime runtime, string identityId, string ruleName,
|
||||
string parameter)
|
||||
{
|
||||
var userRole = _app.LoadForUser(Guid.Parse(identityId));
|
||||
foreach (var role in userRole)
|
||||
{
|
||||
if (role.Name == ruleName)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetIdentities(ProcessInstance processInstance, WorkflowRuntime runtime, string ruleName, string parameter)
|
||||
{
|
||||
var userids = _app.GetUsersInRole(ruleName);
|
||||
if (userids == null) return null;
|
||||
return userids.Select(u => u.ToString());
|
||||
}
|
||||
}
|
||||
}
|
@@ -73,14 +73,6 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="OptimaJet.Workflow.Core, Version=1.5.5.0, Culture=neutral, PublicKeyToken=3d29392dccd464d7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\WorkflowEngine.NET-Core.1.5.5.2\lib\net45\OptimaJet.Workflow.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="OptimaJet.Workflow.DbPersistence, Version=1.5.5.0, Culture=neutral, PublicKeyToken=3d29392dccd464d7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\WorkflowEngine.NET-ProviderForMSSQL.1.5.5.2\lib\net45\OptimaJet.Workflow.DbPersistence.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -158,8 +150,6 @@
|
||||
<Compile Include="AutofacExt.cs" />
|
||||
<Compile Include="Controllers\BaseController.cs" />
|
||||
<Compile Include="Controllers\CategoryManagerController.cs" />
|
||||
<Compile Include="Controllers\WorkflowSchemasController.cs" />
|
||||
<Compile Include="Controllers\DesignerController.cs" />
|
||||
<Compile Include="Controllers\ErrorController.cs" />
|
||||
<Compile Include="Areas\FlowManage\Controllers\CommonAppliesController.cs" />
|
||||
<Compile Include="Controllers\HomeController.cs" />
|
||||
@@ -172,11 +162,7 @@
|
||||
<Compile Include="Controllers\RoleManagerController.cs" />
|
||||
<Compile Include="Controllers\StockManagerController.cs" />
|
||||
<Compile Include="Controllers\UserManagerController.cs" />
|
||||
<Compile Include="Models\DefaultParcedProcessCache.cs" />
|
||||
<Compile Include="Models\JobjectModelBinder.cs" />
|
||||
<Compile Include="Models\WorkflowActionProvider.cs" />
|
||||
<Compile Include="Models\WorkflowInit.cs" />
|
||||
<Compile Include="Models\WorkflowRuleProvider.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
@@ -207,7 +193,7 @@
|
||||
<Content Include="BllScripts\resourceManager.js" />
|
||||
<Content Include="BllScripts\roleManager.js" />
|
||||
<Content Include="BllScripts\commonApply.js" />
|
||||
<Content Include="BllScripts\workflowSchemaManager.js" />
|
||||
<Content Include="BllScripts\flowDesign.js" />
|
||||
<Content Include="BllScripts\stockManager.js" />
|
||||
<Content Include="BllScripts\usermanager.js" />
|
||||
<Content Include="BllScripts\assignRes.js" />
|
||||
@@ -1273,7 +1259,6 @@
|
||||
<Content Include="Images\login\bg.jpg" />
|
||||
<Content Include="Images\x.png" />
|
||||
<Content Include="Scripts\ace.js" />
|
||||
<Content Include="Scripts\designerconstants.js" />
|
||||
<Content Include="Scripts\ext-searchbox.js" />
|
||||
<Content Include="Scripts\jquery-ui.js" />
|
||||
<Content Include="Scripts\jquery.js" />
|
||||
@@ -1282,7 +1267,6 @@
|
||||
<Content Include="Scripts\mode-csharp.js" />
|
||||
<Content Include="Scripts\mode-json.js" />
|
||||
<Content Include="Scripts\theme-monokai.js" />
|
||||
<Content Include="Scripts\workflowdesigner.min.js" />
|
||||
<Content Include="Views\CategoryManager\Index.cshtml" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.eot" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.ttf" />
|
||||
@@ -1522,7 +1506,6 @@
|
||||
<Content Include="Areas\FlowManage\Views\FlowMyProcess\ProcessLookForm.cshtml" />
|
||||
<Content Include="Areas\FlowManage\Views\CommonApplies\ProcessLookForm.cshtml" />
|
||||
<None Include="Properties\PublishProfiles\default.pubxml" />
|
||||
<Content Include="Views\Designer\Index.cshtml" />
|
||||
<None Include="Views\Error\NoAccess.cshtml" />
|
||||
<Content Include="Views\Home\git.cshtml" />
|
||||
<Content Include="Web.config">
|
||||
@@ -1543,7 +1526,6 @@
|
||||
<Content Include="Views\StockManager\Index.cshtml" />
|
||||
<Content Include="Views\Shared\_Layout.cshtml" />
|
||||
<Content Include="Areas\FlowManage\Views\CommonApplies\Index.cshtml" />
|
||||
<Content Include="Views\WorkflowSchemas\Index.cshtml" />
|
||||
<Content Include="Views\Home\Navbar.cshtml" />
|
||||
<Content Include="Views\Shared\Blank.cshtml" />
|
||||
<Content Include="Views\Shared\_LayoutNoHeader.cshtml" />
|
||||
|
@@ -1,186 +0,0 @@
|
||||
var WorkflowDesignerConstants = {
|
||||
SelectColor: 'purple',
|
||||
ActivityColor: '#F2F2F2',
|
||||
ActivityInitialColor: '#00ff00',
|
||||
ActivityFinalColor: '#ff0000',
|
||||
ActivityCurrentColor: '#00CCCC',
|
||||
|
||||
DeleteConfirm: '确定要删除所选项?',
|
||||
FieldIsRequired: 'Field is required!',
|
||||
FieldMustBeUnique: 'Field must be unique!',
|
||||
ButtonTextDelete: '删除',
|
||||
ButtonTextCreate: '创建',
|
||||
|
||||
InfoBlockLabel: {
|
||||
Activity: '节点: ',
|
||||
Transition: '状态转换: ',
|
||||
Command: '命令: ',
|
||||
},
|
||||
|
||||
ActivityNamePrefix: 'Activity_',
|
||||
ActivityFormLabel: {
|
||||
Title: '节点',
|
||||
Name: '名称',
|
||||
State: '状态',
|
||||
IsInitial: '是否为初始节点',
|
||||
IsFinal: '是否为完成节点',
|
||||
IsForSetState: '是否修改状态',
|
||||
IsAutoSchemeUpdate: '是否自动更新',
|
||||
Implementation: '执行操作',
|
||||
PreExecutionImplementation: '提前执行操作',
|
||||
ImpOrder: '序号',
|
||||
ImpAction: '操作',
|
||||
ImpActionParameter: '操作参数',
|
||||
AlwaysConditionShouldBeSingle: 'Always condition should be single',
|
||||
OtherwiseConditionShouldBeSingle: 'Otherwise condition should be single'
|
||||
|
||||
},
|
||||
|
||||
TransitionFormLabel: {
|
||||
Title: '状态转换',
|
||||
Name: '名称',
|
||||
From: '上一步',
|
||||
To: '下一步',
|
||||
Classifier: '类型',
|
||||
Restrictions: '限制条件',
|
||||
RestrictionsType: '类型',
|
||||
RestrictionsActor: '执行人',
|
||||
Condition: '转换条件',
|
||||
ConditionType: '类型',
|
||||
ConditionAction: '操作',
|
||||
ResultOnPreExecution: 'Result on PreExecution',
|
||||
Trigger: '触发',
|
||||
TriggerType: '触发类型',
|
||||
TriggerCommand: '命令',
|
||||
TriggerTimer: '定时',
|
||||
ConditionActionParameter: '操作参数',
|
||||
ConditionInversion: '转换执行结果',
|
||||
ConditionsConcatenationType: 'Conditions concatenation type',
|
||||
AllowConcatenationType: 'Concat allow as',
|
||||
RestrictConcatenationType: 'Concat restrict as',
|
||||
ConditionsListShouldNotBeEmpty: 'Conditions list should not be empty',
|
||||
IsFork: 'Is fork',
|
||||
MergeViaSetState: 'Merge subprocess via set state',
|
||||
DisableParentStateControl: 'Disable parent process control'
|
||||
|
||||
},
|
||||
LocalizationFormLabel: {
|
||||
Title: 'Localization',
|
||||
ObjectName: 'ObjectName',
|
||||
Type: 'Type',
|
||||
IsDefault: 'IsDefault',
|
||||
Culture: 'Culture',
|
||||
Value: 'Value',
|
||||
Types: ['Command', 'State', 'Parameter'],
|
||||
},
|
||||
|
||||
TimerFormLabel: {
|
||||
Title: 'Timers',
|
||||
Name: 'Name',
|
||||
Type: 'Type',
|
||||
Value: 'Value',
|
||||
Types: ['Command', 'State', 'Parameter'],
|
||||
NotOverrideIfExists: "Do not override timer if exists"
|
||||
},
|
||||
|
||||
ParameterFormLabel: {
|
||||
Title: '系统参数',
|
||||
Name: 'Name',
|
||||
Type: 'Type',
|
||||
Purpose: 'Purpose',
|
||||
Value: 'Value',
|
||||
InitialValue: '默认值'
|
||||
},
|
||||
|
||||
ActorFormLabel: {
|
||||
Title: '执行人',
|
||||
Name: '名称',
|
||||
Rule: 'Rule',
|
||||
Value: 'Value'
|
||||
},
|
||||
|
||||
CommandFormLabel: {
|
||||
Title: '命令',
|
||||
Name: "名称",
|
||||
InputParameters: "Input Parameters",
|
||||
InputParametersName: 'Name',
|
||||
InputParametersParameter: 'Parameter'
|
||||
},
|
||||
|
||||
AdditionalParamsFormLabel: {
|
||||
Title: 'Additional Parameters',
|
||||
IsObsolete: "IsObsolete",
|
||||
DefiningParameters: 'Defining parameters',
|
||||
ProcessParameters: 'Process parameters',
|
||||
ProcessParametersName: 'Name',
|
||||
ProcessParametersValue: 'Value'
|
||||
},
|
||||
CodeActionsFormLabel: {
|
||||
Title: '代码片段',
|
||||
Name: 'Name',
|
||||
ActionCode: 'Action code',
|
||||
IsGlobal: 'Is global',
|
||||
Type: 'Type'
|
||||
},
|
||||
|
||||
ToolbarLabel: {
|
||||
CreateActivity: '创建节点',
|
||||
CopySelected: '复制所选',
|
||||
Undo: '撤销',
|
||||
Redo: '重做',
|
||||
Move: '移动',
|
||||
ZoomIn: '放大',
|
||||
ZoomOut: '缩小',
|
||||
ZoomPositionDefault: '默认大小',
|
||||
AutoArrangement: '自动排列',
|
||||
Actors: '执行人',
|
||||
Commands: '命令',
|
||||
Parameters: '参数',
|
||||
Localization: '本地化',
|
||||
Timers: '定时器',
|
||||
AdditionalParameters: '附加参数',
|
||||
CodeActions: '代码片段'
|
||||
},
|
||||
ErrorActivityIsInitialCountText: "One element must be marked flag Initial",
|
||||
ErrorReadOnlySaveText: "The Designer in ReadOnly mode, you can't save it.",
|
||||
FormMaxHeight: 500,
|
||||
EditCodeSettings: {
|
||||
Height: 600,
|
||||
Width: 1000,
|
||||
CodeHeight: 390,
|
||||
MessageBoxHeight: 400,
|
||||
MessageBoxWidth: 600,
|
||||
SuccessBoxHeight: 150,
|
||||
SuccessBoxWidth: 300
|
||||
},
|
||||
EditCodeLabel: {
|
||||
Title: "Edit code",
|
||||
EditCodeButton: 'Edit code',
|
||||
Usings: 'Usings',
|
||||
Compile: "Compile",
|
||||
CompileSucceeded: "Compilation succeeded.",
|
||||
Success: "Success",
|
||||
Error: "Error",
|
||||
OK: "OK"
|
||||
},
|
||||
|
||||
EditJSONSettings: {
|
||||
Height: 600,
|
||||
Width: 1000,
|
||||
CodeHeight: 390,
|
||||
MessageBoxHeight: 400,
|
||||
MessageBoxWidth: 600,
|
||||
SuccessBoxHeight: 150,
|
||||
SuccessBoxWidth: 300
|
||||
},
|
||||
EditJSONLabel: {
|
||||
Title: "Edit code",
|
||||
EditCodeButton: 'Edit code',
|
||||
Usings: 'Usings',
|
||||
Compile: "Compile",
|
||||
CompileSucceeded: "Compilation succeeded.",
|
||||
Success: "Success",
|
||||
Error: "Error",
|
||||
OK: "OK"
|
||||
}
|
||||
};
|
3
OpenAuth.Mvc/Scripts/workflowdesigner.min.js
vendored
3
OpenAuth.Mvc/Scripts/workflowdesigner.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,95 +0,0 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<script src="/Scripts/jquery.js"></script>
|
||||
<script src="/Scripts/jquery-ui.js"></script>
|
||||
<script src="/Scripts/kinetic-v5.1.0.min.js"></script>
|
||||
<script src="/Scripts/workflowdesigner.min.js"></script>
|
||||
<script src="/Scripts/designerconstants.js"></script>
|
||||
<script src="/Scripts/ace.js"></script>
|
||||
<script src="/Scripts/json5.js"></script>
|
||||
<script src="/BllScripts/queryString.js"></script>
|
||||
|
||||
<link href="/Content/style.css" rel="stylesheet" />
|
||||
<link href="/Content/plugins/jQueryUI/base/jquery-ui.min.css" rel="stylesheet" />
|
||||
<link href="/Content/workflowdesigner.css" rel="stylesheet" type="text/css"/>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>大小:</td>
|
||||
<td><input id="graphwidth" value="1200" /> x <input id="graphheight" value="600" /></td>
|
||||
<td><button onclick="wfdesignerRedraw()">缩放</button></td>
|
||||
<td>
|
||||
|
|
||||
</td>
|
||||
<td><label class="msg-wrap">*模板名称</label></td>
|
||||
<td><input value="" id="schemeName" /></td>
|
||||
<td><button class="btn btn-primary" onclick="OnSave()">保存</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<div id="wfdesigner"></div>
|
||||
|
||||
<script>
|
||||
var schemecode = decodeURI(QueryString["schemeName"]);
|
||||
var inputScheme = $("#schemeName");
|
||||
var add = schemecode == "" ? true : false;
|
||||
if (!add) {
|
||||
inputScheme.val(schemecode);
|
||||
inputScheme.attr("readonly", "readonly");
|
||||
}
|
||||
|
||||
var wfdesigner = undefined;
|
||||
|
||||
function wfdesignerRedraw() {
|
||||
var data;
|
||||
|
||||
if (wfdesigner != undefined) {
|
||||
data = wfdesigner.data;
|
||||
wfdesigner.destroy();
|
||||
}
|
||||
|
||||
wfdesigner = new WorkflowDesigner({
|
||||
name: 'simpledesigner',
|
||||
apiurl: '/Designer/API',
|
||||
renderTo: 'wfdesigner',
|
||||
imagefolder: '/images/',
|
||||
graphwidth: $('#graphwidth').val(),
|
||||
graphheight: $('#graphheight').val()
|
||||
});
|
||||
|
||||
if (add) {
|
||||
wfdesigner.create();
|
||||
} else {
|
||||
if (data == undefined) {
|
||||
var isreadonly = false;
|
||||
var p = { schemecode: schemecode, readonly: isreadonly };
|
||||
if (wfdesigner.exists(p)) //如果已经存在
|
||||
wfdesigner.load(p);
|
||||
} else {
|
||||
wfdesigner.data = data;
|
||||
wfdesigner.render();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
wfdesignerRedraw();
|
||||
|
||||
function OnSave() {
|
||||
if (inputScheme.val().length == 0) {
|
||||
alert("请输入模板名称");
|
||||
return;
|
||||
}
|
||||
wfdesigner.schemecode = inputScheme.val();
|
||||
var err = wfdesigner.validate();
|
||||
if (err != undefined && err.length > 0) {
|
||||
alert(err);
|
||||
} else {
|
||||
wfdesigner.save(function () {
|
||||
alert('保存成功');
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
@@ -1,40 +0,0 @@
|
||||
@{
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<!-- #section:basics/content.breadcrumbs -->
|
||||
<div class="breadcrumbs" id="breadcrumbs">
|
||||
<ul class="breadcrumb">
|
||||
<li>
|
||||
<i class="ace-icon fa fa-home home-icon"></i>
|
||||
<a href="#">流程设计</a>
|
||||
</li>
|
||||
<li class="active">列表</li>
|
||||
</ul><!-- /.breadcrumb -->
|
||||
</div>
|
||||
|
||||
<!-- /section:basics/content.breadcrumbs -->
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="widget-box widget-color-blue">
|
||||
<div class="widget-header">
|
||||
@Html.Action("MenuHeader", "Home")
|
||||
</div>
|
||||
<div class="widget-body gridwidth">
|
||||
<div class="widget-main">
|
||||
<div class="row">
|
||||
<div class="col-md-12 ">
|
||||
<table id="maingrid"></table>
|
||||
<div id="grid-pager"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.page-content -->
|
||||
<script src="~/BllScripts/grid.js"></script>
|
||||
<script src="~/BllScripts/workflowSchemaManager.js"></script>
|
||||
<script src="~/BllScripts/jqEvent.js"></script>
|
@@ -17,7 +17,6 @@
|
||||
<add name="OpenAuthDBContext" connectionString="Data Source=.;Initial Catalog=OpenAuthDB;Persist Security Info=True;User ID=sa;Password=000000;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
|
||||
|
||||
<!--工作流数据库-->
|
||||
<add name="WorkFlow" connectionString="Data Source=.;Initial Catalog=Workflow.Net;Persist Security Info=True;User ID=sa;Password=000000;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
|
||||
<!--<add name="OpenAuthDBContext" connectionString="server=127.0.0.1;user id=root;persistsecurityinfo=True;database=openauth;password=123456" providerName="MySql.Data.MySqlClient" />-->
|
||||
</connectionStrings>
|
||||
|
||||
@@ -53,8 +52,6 @@
|
||||
<component type=" OpenAuth.Repository.CategoryRepository" service="OpenAuth.Domain.Interface.ICategoryRepository,OpenAuth.Domain" />
|
||||
<component type=" OpenAuth.Repository.ResourceRepository" service="OpenAuth.Domain.Interface.IResourceRepository,OpenAuth.Domain" />
|
||||
<component type=" OpenAuth.Repository.StockRepository" service="OpenAuth.Domain.Interface.IStockRepository,OpenAuth.Domain" />
|
||||
<component type=" OpenAuth.Repository.Workflow.WorkflowSchemeRepository"
|
||||
service="OpenAuth.Domain.Interface.IWorkflowSchemeRepository,OpenAuth.Domain" />
|
||||
</components>
|
||||
</autofac>
|
||||
|
||||
|
@@ -25,7 +25,4 @@
|
||||
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
|
||||
<package id="Respond" version="1.2.0" targetFramework="net45" />
|
||||
<package id="WebGrease" version="1.5.2" targetFramework="net45" />
|
||||
<package id="WorkflowEngine.NET-Core" version="1.5.5.2" targetFramework="net45" />
|
||||
<package id="WorkflowEngine.NET-Designer" version="1.5.5.2" targetFramework="net45" />
|
||||
<package id="WorkflowEngine.NET-ProviderForMSSQL" version="1.5.5.2" targetFramework="net45" />
|
||||
</packages>
|
Reference in New Issue
Block a user