public Object SubmitAction(UpdateStatusOperationData opData) { var datamap = opData.CrudData; datamap.Attributes["status"] = opData.status; datamap.Attributes["#submittingaction"] = "true"; var owner = datamap.GetAttribute("owner"); var isIbmTicket = HlagTicketUtil.IsIBMTicket(datamap); if (owner != null && isIbmTicket && datamap.Attributes["status"].Equals("QUEUED")) { //HAP-839 review datamap.Attributes["status"] = "INPROG"; } return(Maximoengine.Update(datamap)); }
private void SaveOriginator(FollowUpOperationData followUpData) { var maximoExecutionContext = GetContext(followUpData); var metadataToUse = followUpData.EntityMetadata; var oldEntity = (DataMap)EntityRepository.Get(metadataToUse, followUpData.origrecordid); if (oldEntity == null) { throw new InvalidOperationException(String.Format(NotFoundLog, metadataToUse.Name, followUpData.origrecordid)); } oldEntity.Attributes.Add("HASFOLLOWUPWORK", true); //TODO: make it easier to generate a CrudOperationData from a DataMap... var json = JObject.Parse(JsonConvert.SerializeObject(oldEntity.Fields)); var originalWoData = EntityBuilder.BuildFromJson <CrudOperationData>(typeof(CrudOperationData), metadataToUse, maximoExecutionContext.ApplicationMetadata, json, followUpData.origrecordid); Maximoengine.Update(originalWoData); }