{"record":{"id":"08822a5cf004b995","repo":"flowable/flowable-engine","slug":"type-is-required-when-adding-a-new-app-identity-li","errorCode":null,"errorMessage":"type is required when adding a new app identity link","messagePattern":"type is required when adding a new app identity link","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/DeleteIdentityLinkCmd.java","lineNumber":53,"sourceCode":"\n    protected String type;\n\n    public DeleteIdentityLinkCmd(String appDefinitionId, String userId, String groupId, String type) {\n        super(appDefinitionId);\n        validateParams(userId, groupId, type, appDefinitionId);\n        this.appDefinitionId = appDefinitionId;\n        this.userId = userId;\n        this.groupId = groupId;\n        this.type = type;\n    }\n\n    protected void validateParams(String userId, String groupId, String type, String taskId) {\n        if (appDefinitionId == null) {\n            throw new FlowableIllegalArgumentException(\"appDefinitionId is null\");\n        }\n\n        if (type == null) {\n            throw new FlowableIllegalArgumentException(\"type is required when adding a new app identity link\");\n        }\n\n        if (userId == null && groupId == null) {\n            throw new FlowableIllegalArgumentException(\"userId and groupId cannot both be null\");\n        }\n    }\n\n    @Override\n    protected Void execute(CommandContext commandContext, AppDefinition appDefinition) {\n        CommandContextUtil.getIdentityLinkService().deleteScopeIdentityLink(appDefinitionId, ScopeTypes.APP, userId, groupId, type);\n\n        return null;\n    }\n\n}\n","sourceCodeStart":35,"sourceCodeEnd":69,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/DeleteIdentityLinkCmd.java#L35-L69","documentation":"Guard in DeleteIdentityLinkCmd.validateParams: the link type (e.g. assignee, candidate, owner) is null. Without a type the engine cannot tell which kind of identity link to remove, so the request is rejected up front.","triggerScenarios":"Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/cmd/DeleteIdentityLinkCmd.java:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Send one of the recognised identity-link types (assignee, candidate, owner, starter, ...) in the request","Default to a sensible type in the calling layer when the client omits it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}