docs: protected void removeMessageJobDeclarationWithJobConfiguration(ActivityImpl activity, String jobConfiguration) {
      List<MessageJobDeclaration> messageJobDeclarations = (List<MessageJobDeclaration>) activity.getProperty(PROPERTYNAME_MESSAGE_JOB_DECLARATION);
      if (messageJobDeclarations != null) {
        Iterator<MessageJobDeclaration> iter = messageJobDeclarations.iterator();
        while (iter.hasNext()) {
          MessageJobDeclaration msgDecl = iter.next();
          if (msgDecl.getJobConfiguration().equalsIgnoreCase(jobConfiguration)
            && msgDecl.getActivityId().equalsIgnoreCase(activity.getActivityId())) {
            iter.remove();
          }
        }
      }
  
      ProcessDefinition procDef = (ProcessDefinition) activity.getProcessDefinition();
      List<JobDeclaration<?, ?>> declarations = jobDeclarations.get(procDef.getKey());
      if (declarations != null) {
        Iterator<JobDeclaration<?, ?>> iter = declarations.iterator();
        while (iter.hasNext()) {
          JobDeclaration<?, ?> jobDcl = iter.next();
          if (jobDcl.getJobConfiguration().equalsIgnoreCase(jobConfiguration)
              && jobDcl.getActivityId().equalsIgnoreCase(activity.getActivityId())) {
            iter.remove();
          }
        }
      }
    }