Package org.joget.apps.app.model

Examples of org.joget.apps.app.model.AppDefinition


    public String getDescription() {
        return "";
    }

    public String getPropertyOptions() {
        AppDefinition appDef = AppUtil.getCurrentAppDefinition();
        String appId = appDef.getId();
        String appVersion = appDef.getVersion().toString();
        Object[] arguments = new Object[]{appId, appVersion};
        String json = AppUtil.readPluginResource(getClass().getName(), "/properties/userview/runProcess.json", arguments, true, "message/userview/runProcess");
        return json;
    }
View Full Code Here


                JSONArray jsonArray = new JSONArray();

                ApplicationContext ac = AppUtil.getApplicationContext();
                AppService appService = (AppService) ac.getBean("appService");
                WorkflowManager workflowManager = (WorkflowManager) ac.getBean("workflowManager");
                AppDefinition appDef = appService.getAppDefinition(appId, appVersion);
                PackageDefinition packageDefinition = appDef.getPackageDefinition();
                Long packageVersion = (packageDefinition != null) ? packageDefinition.getVersion() : new Long(1);
                Collection<WorkflowProcess> processList = workflowManager.getProcessList(appId, packageVersion.toString());

                Map<String, String> empty = new HashMap<String, String>();
                empty.put("value", "");
View Full Code Here

            if (startFormDef != null && (startFormDef.getForm() != null || PackageActivityForm.ACTIVITY_FORM_TYPE_EXTERNAL.equals(startFormDef.getType()))) {
                Form startForm = startFormDef.getForm();

                // generate form HTML
                String formHtml = formService.retrieveFormHtml(startForm, formData);
                AppDefinition appDef = appService.getAppDefinition(getRequestParameterString("appId"), getRequestParameterString("appVersion"));

                // show form
                setProperty("headerTitle", process.getName());
                setProperty("view", "formView");
                setProperty("formHtml", formHtml);
View Full Code Here

                    // validation error, get form
                    Form startForm = startFormDef.getForm();

                    // generate form HTML
                    String formHtml = formService.retrieveFormErrorHtml(startForm, formData);
                    AppDefinition appDef = appService.getAppDefinition(getRequestParameterString("appId"), getRequestParameterString("appVersion"));

                    // show form
                    setProperty("headerTitle", process.getName());
                    setProperty("view", "formView");
                    setProperty("formHtml", formHtml);
View Full Code Here

                // get form
                String formUrl = getUrl() + "?_action=assignmentSubmit&activityId=" + activityId;
                PackageActivityForm activityForm = appService.viewAssignmentForm(getRequestParameterString("appId"), getRequestParameterString("appVersion"), activityId, formData, formUrl);
                Form form = activityForm.getForm();
                AppDefinition appDef = appService.getAppDefinition(getRequestParameterString("appId"), getRequestParameterString("appVersion"));

                // generate form HTML
                String formHtml = formService.retrieveFormHtml(form, formData);

                // show form
View Full Code Here

            if (pInstance == null) {
                pInstance = new ReportWorkflowProcessInstance();
                pInstance.setInstanceId(processInstanceId);

                //get app
                AppDefinition appDef = appService.getAppDefinition(appId, appVersion);
                ReportApp reportApp = reportManager.getReportApp(appId, appVersion, appDef.getName());

                //get package
                ReportWorkflowPackage reportPackage = reportManager.getReportWorkflowPackage(reportApp, wfProcess.getPackageId(), wfProcess.getVersion(), wfProcess.getName());

                //get process
View Full Code Here

    /**
     * Create userview fron json
     * @return
     */
    public Userview createUserview(String json, String menuId, boolean preview, String contextPath, Map requestParameters, String key, Boolean embed) {
        AppDefinition appDef = AppUtil.getCurrentAppDefinition();
        return createUserview(appDef, json, menuId, preview, contextPath, requestParameters, key, embed);
    }
View Full Code Here

        UserviewTheme theme = null;
       
        Long appVersion = appService.getPublishedVersion(appId);
        HttpServletRequest request = WorkflowUtil.getHttpServletRequest();
        if (appVersion != null && request != null) {
            AppDefinition appDef = appService.getAppDefinition(appId, appVersion.toString());
            if (appDef != null) {
                UserviewDefinition userviewDef = userviewDefinitionDao.loadById(userviewId, appDef);
                if (userviewDef != null) {
                    String json = userviewDef.getJson();
                    //process json with hash variable
                    json = AppUtil.processHashVariable(json, null, StringUtil.TYPE_JSON, null);
                   
                    Map requestParameters = convertRequestParamMap(request.getParameterMap());
                    requestParameters.put("contextPath", request.getContextPath());
                    requestParameters.put("appId", appDef.getAppId());
                    requestParameters.put("appVersion", appDef.getVersion().toString());
                   
                    try {
                        Userview userview = new Userview();
                       
                        //set userview properties
View Full Code Here

     * @param processDefId
     * @return
     */
    @Override
    public WorkflowProcess getWorkflowProcessForApp(String appId, String version, String processDefId) {
        AppDefinition appDef = getAppDefinition(appId, version);
        PackageDefinition packageDef = appDef.getPackageDefinition();
        String processDefIdWithVersion = AppUtil.getProcessDefIdWithVersion(packageDef.getId(), packageDef.getVersion().toString(), processDefId);
        WorkflowProcess process = workflowManager.getProcess(processDefIdWithVersion);
        return process;
    }
View Full Code Here

     * @param activityId
     * @return
     */
    @Override
    public AppDefinition getAppDefinitionForWorkflowActivity(String activityId) {
        AppDefinition appDef = null;

        WorkflowActivity activity = workflowManager.getActivityById(activityId);
        if (activity != null) {
            String processDefId = activity.getProcessDefId();
            WorkflowProcess process = workflowManager.getProcess(processDefId);
View Full Code Here

TOP

Related Classes of org.joget.apps.app.model.AppDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.