public UserInfo GetIdentityLink(string taskId, IdentityLinkFamily family, string identityId, string type)
        {
            string url = string.Format("{0}/{1}/identitylinks/{2}/{3}/{4}",
                                       tasksUrl, taskId, family.ToString().ToLower(), identityId, type);

            return(BaseInfoProvider <UserInfo> .ExecuteOperation(url, HttpMethod.GET, "kermit", "kermit"));
        }
        public VariableInfo GetVariable(string taskId, string variableName, Scope scope)
        {
            string scopeString = scope == Scope.Empty ? "" : scope.ToString();
            string url         = string.Format("{0}/{1}/variables/{2}?scope={3}", tasksUrl, taskId, variableName, scopeString);

            return(BaseInfoProvider <VariableInfo> .ExecuteOperation(url, HttpMethod.GET, "kermit", "kermit"));
        }
        public List <VariableInfo> GetVariables(string executionId, Scope scope)
        {
            string scopeString = scope == Scope.Empty ? "" : scope.ToString();
            string url         = string.Format("{0}/{1}/variables?scope={2}", UrlConstants.EXECUTION, executionId, scopeString);

            return(BaseInfoProvider <List <VariableInfo> > .ExecuteOperation(url, HttpMethod.GET, "kermit", "kermit"));
        }
Beispiel #4
0
        public UserInfo AddGroupCandidate(string processId, string groupId)
        {
            string url = string.Concat(_baseUrl, UrlConstants.PROCESS, "/", processId, "/identitylinks");

            JObject json = new JObject();

            json.Add("group", groupId);

            return(BaseInfoProvider <UserInfo> .ExecuteOperation(url, HttpMethod.POST, "kermit", "kermit", json.ToString()));
        }
Beispiel #5
0
        /// <summary>
        /// Add member to existing group.
        /// </summary>
        /// <param name="groupId">Id of the group.</param>
        /// <param name="userId">Id of the user.</param>
        /// <returns><seealso cref="UserInfo"/> object.</returns>
        public UserInfo AddMember(string groupId, string userId)
        {
            string url = UrlBuilder.BuildUrl(UrlConstants.GROUP, groupId, "members");

            JObject json = new JObject();

            json.Add("userId", userId);

            return(BaseInfoProvider <UserInfo> .ExecuteOperation(url, Network.HttpMethod.POST, "kermit", "kermit", body : json.ToString()));
        }
Beispiel #6
0
        /// <summary>
        /// Update existing user information on existing user.
        /// </summary>
        /// <param name="userId">Id of the user.</param>
        /// <param name="userInformationKey">Key of the information.</param>
        /// <param name="userInformationValue">New value of the information.</param>
        /// <returns>Updated <seealso cref="UserInformations"> object.</seealso></returns>
        public UserInformations UpdateUserInformation(string userId, string userInformationKey, string userInformationValue)
        {
            string url = UrlBuilder.BuildUrl(UrlConstants.USER, userId, "info", userInformationKey);

            JObject json = new JObject();

            json.Add("value", userInformationValue);

            return(BaseInfoProvider <UserInformations> .ExecuteOperation(url, HttpMethod.PUT, "kermit", "kermit", body : json.ToString()));
        }
        public VariableInfo CreateVariable(string taskId, VariableInfo variable)
        {
            string url = string.Format("{0}/{1}/variables/{2}", tasksUrl, taskId, variable.Name);

            return(BaseInfoProvider <VariableInfo> .ExecuteOperation(url, HttpMethod.PUT, "kermit", "kermit", JsonConvert.SerializeObject(variable)));
        }
Beispiel #8
0
        public List <VariableInfo> GetVariables(string processInstanceId)
        {
            string url = string.Format("{0}/{1}/variables", UrlConstants.PROCESS_INSTANCE, processInstanceId);

            return(BaseInfoProvider <List <VariableInfo> > .ExecuteOperation(url, HttpMethod.GET, "kermit", "kermit"));
        }
        public EventInfo GetEvent(string taskId, string eventId)
        {
            string url = string.Format("{0}/{1}/events/{2}", tasksUrl, taskId, eventId);

            return(BaseInfoProvider <EventInfo> .ExecuteOperation(url, HttpMethod.GET, "kermit", "kermit"));
        }
        public VariableInfo CreateVariables(string executionId, List <VariableInfo> variable)
        {
            string url = string.Format("{0}/{1}/variables", UrlConstants.EXECUTION, executionId);

            return(BaseInfoProvider <VariableInfo> .ExecuteOperation(url, HttpMethod.PUT, "kermit", "kermit", JsonConvert.SerializeObject(variable)));
        }
        public List <string> GetActiveActivities(string executionId)
        {
            string url = string.Format("{0}/{1}/activities", UrlConstants.EXECUTION, executionId);

            return(BaseInfoProvider <List <string> > .ExecuteOperation(url, HttpMethod.GET, "kermit", "kermit"));
        }
Beispiel #12
0
        /// <summary>
        /// Gets all members of the group.
        /// </summary>
        /// <param name="groupId">Id of the group.</param>
        /// <returns><seealso cref="List{UserInfo}"/> object.</returns>
        public List <UserInfo> GetMembers(string groupId)
        {
            string url = UrlBuilder.BuildUrl(UrlConstants.USER) + "?memberOfGroup=" + groupId;

            return(BaseInfoProvider <List <UserInfo> > .ExecuteOperation(url, Network.HttpMethod.GET, "kermit", "kermit", jsonRoot : "data"));
        }
        public UserInfo CreateIdentityLink(string taskId, UserInfo identityLink)
        {
            string url = string.Format("{0}/{1}/identitylinks", tasksUrl, taskId);

            return(BaseInfoProvider <UserInfo> .ExecuteOperation(url, HttpMethod.POST, "kermit", "kermit", JsonConvert.SerializeObject(identityLink)));
        }
Beispiel #14
0
        public VariableInfo CreateVariable(string processInstance, VariableInfo variable)
        {
            string url = string.Format("{0}/{1}/variables/{2}", UrlConstants.PROCESS_INSTANCE, processInstance, variable.Name);

            return(BaseInfoProvider <VariableInfo> .ExecuteOperation(url, HttpMethod.PUT, "kermit", "kermit", JsonConvert.SerializeObject(variable)));
        }
        public List <UserInfo> GetGroups(string taskId)
        {
            string url = string.Format("{0}/{1}/identitylinks/groups", tasksUrl, taskId);

            return(BaseInfoProvider <List <UserInfo> > .ExecuteOperation(url, HttpMethod.GET, "kermit", "kermit"));
        }
        public List <UserInfo> GetIdentityInfo(string taskId, string family, string identityId, string type)
        {
            string url = string.Format("{0}/{1}/identitylinks/{2}/{3}/{4}", tasksUrl, taskId, family, identityId, type);

            return(BaseInfoProvider <List <UserInfo> > .ExecuteOperation(url, HttpMethod.GET, "kermit", "kermit"));
        }
        public VariableInfo DeleteLocalVariables(string taskId, string variableName)
        {
            string url = string.Format("{0}/{1}/variables/{2}", tasksUrl, taskId, variableName);

            return(BaseInfoProvider <VariableInfo> .ExecuteOperation(url, HttpMethod.DELETE, "kermit", "kermit"));
        }
Beispiel #18
0
        /// <summary>
        /// Delete existing information on existing user.
        /// </summary>
        /// <param name="userId">Id of the user.</param>
        /// <param name="userInformationKey">Key of the information.</param>
        /// <returns>Deleted <seealso cref="UserInformations"/> object.</returns>
        public UserInformations DeleteUserInformation(string userId, string userInformationKey)
        {
            string url = UrlBuilder.BuildUrl(UrlConstants.USER, userId, "info", userInformationKey);

            return(BaseInfoProvider <UserInformations> .ExecuteOperation(url, HttpMethod.DELETE, "kermit", "kermit"));
        }
Beispiel #19
0
        /// <summary>
        /// Create new user information for existing user.
        /// </summary>
        /// <param name="userId">Id of the user.</param>
        /// <param name="userInformation">Value of the user information.</param>
        /// <returns>Created user informtaion.</returns>
        public UserInformations CreateUserInformation(string userId, UserInformations userInformation)
        {
            string url = UrlBuilder.BuildUrl(UrlConstants.USER, userId, "info");

            return(BaseInfoProvider <UserInformations> .ExecuteOperation(url, HttpMethod.POST, "kermit", "kermit", body : JsonConvert.SerializeObject(userInformation)));
        }
        public VariableInfo DeleteVariable(string taskId, string variableName, Scope scope)
        {
            string url = string.Format("{0}/{1}/variables/{2}?scope={3}", tasksUrl, taskId, variableName, scope.ToString().ToLower());

            return(BaseInfoProvider <VariableInfo> .ExecuteOperation(url, HttpMethod.DELETE, "kermit", "kermit"));
        }
Beispiel #21
0
        /// <summary>
        /// Delete member from existing group.
        /// </summary>
        /// <param name="groupId">Id of the group.</param>
        /// <param name="userId">Id of the user.</param>
        public void DeleteMember(string groupId, string userId)
        {
            string url = UrlBuilder.BuildUrl(UrlConstants.GROUP, groupId, "members", userId);

            BaseInfoProvider <UserInfo> .ExecuteOperation(url, Network.HttpMethod.DELETE, "kermit", "kermit");
        }
        public CommentInfo AddComment(string taskId, string message, bool saveProcessInstanceId = true)
        {
            string url = string.Format("{0}/{1}/comments", tasksUrl, taskId);

            return(BaseInfoProvider <CommentInfo> .ExecuteOperation(url, HttpMethod.POST, "kermit", "kermit"));
        }
Beispiel #23
0
        public List <UserInfo> GetAllCandidateStarters(string processId)
        {
            string url = string.Concat(_baseUrl, UrlConstants.PROCESS, "/", processId, "/identitylinks");

            return(BaseInfoProvider <List <UserInfo> > .ExecuteOperation(url, HttpMethod.GET, "kermit", "kermit"));
        }
Beispiel #24
0
        public UserInfo RemoveInvolvedUser(string processInstanceId, string userId, string userType)
        {
            string url = string.Format("{0}/{1}/identitylinks/users/{2}/{3}", UrlConstants.PROCESS_INSTANCE, processInstanceId, userId, userType);

            return(BaseInfoProvider <UserInfo> .ExecuteOperation(url, HttpMethod.POST, "kermit", "kermit"));
        }
        public VariableInfo UpdateVariable(string executionId, VariableInfo variable)
        {
            string url = string.Format("{0}/{1}/variables/{2}", UrlConstants.EXECUTION, executionId, variable.Name);

            return(BaseInfoProvider <VariableInfo> .ExecuteOperation(url, HttpMethod.POST, "kermit", "kermit", JsonConvert.SerializeObject(variable)));
        }
        public List <EventInfo> GetAllEvents(string taskId)
        {
            string url = string.Format("{0}/{1}/events", tasksUrl, taskId);

            return(BaseInfoProvider <List <EventInfo> > .ExecuteOperation(url, HttpMethod.GET, "kermit", "kermit"));
        }
        public BaseInfoCollection <CommentInfo> GetAllComments(string taskId)
        {
            string url = string.Format("{0}/{1}/comments", tasksUrl, taskId);

            return(BaseInfoProvider <BaseInfoCollection <CommentInfo> > .ExecuteOperation(url, HttpMethod.GET, "kermit", "kermit"));
        }
Beispiel #28
0
        /// <summary>
        /// Get the list of the user informations.
        /// </summary>
        /// <param name="userId">Id of the user.</param>
        /// <returns><seealso cref="List{List{UserInfo}}"/> object.</returns>
        public List <UserInformations> GetUserInformations(string userId)
        {
            string url = UrlBuilder.BuildUrl(UrlConstants.USER, userId, "info");

            return(BaseInfoProvider <List <UserInformations> > .ExecuteOperation(url, HttpMethod.GET, "kermit", "kermit"));
        }
        public CommentInfo DeleteComment(string taskId, string commentId)
        {
            string url = string.Format("{0}/{1}/comments/{2}", tasksUrl, taskId, commentId);

            return(BaseInfoProvider <CommentInfo> .ExecuteOperation(url, HttpMethod.DELETE, "kermit", "kermit"));
        }
Beispiel #30
0
        public UserInfo AddInvolvedUser(string processInstanceId, UserInfo user)
        {
            string url = string.Format("{0}/{1}/identitylinks", UrlConstants.PROCESS_INSTANCE, processInstanceId);

            return(BaseInfoProvider <UserInfo> .ExecuteOperation(url, HttpMethod.POST, "kermit", "kermit", JsonConvert.SerializeObject(user)));
        }