package cn.axzo.workflow.core.engine.formhandler;

import org.flowable.content.api.ContentService;
import org.flowable.engine.impl.formhandler.DefaultFormFieldHandler;
import org.flowable.engine.impl.util.CommandContextUtil;
import org.flowable.form.api.FormFieldHandler;
import org.flowable.form.api.FormInfo;

import java.util.Map;

/**
 * 自定义的具体的表单组件类型处理器
 *
 * @author wangli
 * @since 2025-01-22 13:58
 */
public class CustomFormFieldHandler extends DefaultFormFieldHandler implements FormFieldHandler {
    @Override
    public void handleFormFieldsOnSubmit(FormInfo formInfo,
                                         String taskId,
                                         String processInstanceId,
                                         String scopeId,
                                         String scopeType,
                                         Map<String, Object> variables,
                                         String tenantId) {
        ContentService contentService = CommandContextUtil.getContentService();
        if (contentService == null || formInfo == null) {
            return;
        }
    }

    @Override
    public void enrichFormFields(FormInfo formInfo) {
        super.enrichFormFields(formInfo);
    }
}
