Exemplo n.º 1
0
func AddSubProcessToCurrentOrg(c *middleware.Context, cmd m.AddSubProcessCommand) Response {

	logger := log.New("main")
	logger.Info("Add ProcessForCurrentOrg", c.OrgId)
	cmd.OrgId = c.OrgId

	return addSubProcessHelper(cmd)
}
Exemplo n.º 2
0
func addSubProcessHelper(cmd m.AddSubProcessCommand) Response {

	logger := log.New("main")
	logger.Info("Add ProcessForCurrentOrg111", cmd.OrgId)
	query := m.AddSubProcessCommand{}

	query.OrgId = cmd.OrgId
	query.SubProcessName = cmd.SubProcessName
	query.ProcessName = cmd.ProcessName
	query.UpdatedBy = cmd.UpdatedBy

	if err := bus.Dispatch(&query); err != nil {
		return ApiError(500, "Could not add Sub process to organization", err)
	}

	return ApiSuccess("Sub Process Sucessfully added ")

}