private static WfActivityDescriptor PrepareServerActivity(string key) { WfActivityDescriptor actDesp = new WfActivityDescriptor(key, WfActivityType.InitialActivity); actDesp.Key = key; actDesp.Name = key; actDesp.Condition.Expression = "Amount > 1000"; actDesp.Variables.SetValue("ActKey", key); actDesp.Variables.SetValue("ActName", key); actDesp.Resources.Add(new WfUserResourceDescriptor((IUser)OguUser.CreateWrapperObject(ActivityConverterTest.UserID, SchemaType.Users))); actDesp.Resources.Add(new WfDepartmentResourceDescriptor((IOrganization)OguOrganization.CreateWrapperObject(ActivityConverterTest.OrganizationID, SchemaType.Organizations))); actDesp.Resources.Add(new WfGroupResourceDescriptor((IGroup)OguGroup.CreateWrapperObject(ActivityConverterTest.GroupID, SchemaType.Groups))); actDesp.Resources.Add(new WfRoleResourceDescriptor(new SOARole(ActivityConverterTest.RoleFullCodeName))); actDesp.Resources.Add(new WfActivityOperatorResourceDescriptor() { ActivityKey = ActivityConverterTest.ResActivityKey }); actDesp.Resources.Add(new WfActivityAssigneesResourceDescriptor() { ActivityKey = ActivityConverterTest.ResActivityKey }); actDesp.Resources.Add(new WfDynamicResourceDescriptor("ConditionResource", "Amount > 1000")); actDesp.BranchProcessTemplates.Add(BranchProcessTemplateConverterTest.PrepareServerBranchProcessTemplate()); return(actDesp); }
public WfGroupResourceDescriptor(IGroup group) { this._Group = (IGroup)OguGroup.CreateWrapperObject(group); }