plugin/src/java/org/pm4knime/node/conversion/table2log/Table2XLogConverterNodeModel.java
@Override
    protected PortObject[] execute(final PortObject[] inData,
            final ExecutionContext exec) throws Exception {
    	logger.info("Start : Convert DataTable to Event Log" );
        // TODO: accept input DataTable, use the configuration columnNames, 
    	// convert the data into XLog
    	// how to check the type for this?
    	BufferedDataTable tData = (BufferedDataTable) inData[0];
    	
    	// sort the table w.r.t. caseID column
    	List<String> m_inclList = new ArrayList<String>();
    	m_inclList.add(m_config.getMCaseID().getStringValue());
    	// here we might need to make sure they mean this
    	boolean[] m_sortOrder = {true};
    	boolean m_missingToEnd = false;
    	boolean m_sortInMemory = false;
    	BufferedDataTableSorter sorter = new BufferedDataTableSorter(
    			tData, m_inclList, m_sortOrder, m_missingToEnd);
    	
        sorter.setSortInMemory(m_sortInMemory);
        BufferedDataTable sortedTable = sorter.sort(exec);
    	
        checkCanceled();
    	// convert the string to date and sort them according to caseID? So we can read them easier for rows
    	// it creates the corresponding column spec and create another DataTable for it.
    	// one thing to remember, it is not so important to have order of timestamp. 
    	ToXLogConverter handler = new ToXLogConverter();
    	handler.setConfig(m_config);
    	handler.setLogger(logger);
    	
    	handler.convertDataTable2Log(sortedTable, exec);
    	XLog log = handler.getXLog();
    	
    	checkCanceled();
    	logPO = new XLogPortObject(log);
    	
    	logger.info("End : Convert DataTable to Event Log" );
        return new PortObject[]{logPO};
    }
/**
     * they must portOBject to PortObject, else not working.
     * {@inheritDoc}
     */
they must portOBject to PortObject, else not working.
they must portOBject to PortObject else not working .
@Override
    protected PortObject[] execute(final PortObject[] inData,
            final ExecutionContext exec) throws Exception {
    	logger.info("Start : Convert DataTable to Event Log" );
    	BufferedDataTable tData = (BufferedDataTable) inData[0];
    	List<String> m_inclList = new ArrayList<String>();
    	m_inclList.add(m_config.getMCaseID().getStringValue());
    	boolean[] m_sortOrder = {true};
    	boolean m_missingToEnd = false;
    	boolean m_sortInMemory = false;
    	BufferedDataTableSorter sorter = new BufferedDataTableSorter(
    			tData, m_inclList, m_sortOrder, m_missingToEnd);
        sorter.setSortInMemory(m_sortInMemory);
        BufferedDataTable sortedTable = sorter.sort(exec);
        checkCanceled();
    	ToXLogConverter handler = new ToXLogConverter();
    	handler.setConfig(m_config);
    	handler.setLogger(logger);
    	handler.convertDataTable2Log(sortedTable, exec);
    	XLog log = handler.getXLog();
    	checkCanceled();
    	logPO = new XLogPortObject(log);
    	logger.info("End : Convert DataTable to Event Log" );
        return new PortObject[]{logPO};
    }
@ Override protected PortObject [ ] execute ( final PortObject [ ] inData , final ExecutionContext exec ) throws Exception { logger . info ( "Start : Convert DataTable to Event Log" ) ; BufferedDataTable tData = ( BufferedDataTable ) inData [ 0 ] ; List < String > m_inclList = new ArrayList < String > ( ) ; m_inclList . add ( m_config . getMCaseID ( ) . getStringValue ( ) ) ; boolean [ ] m_sortOrder = { true } ; boolean m_missingToEnd = false ; boolean m_sortInMemory = false ; BufferedDataTableSorter sorter = new BufferedDataTableSorter ( tData , m_inclList , m_sortOrder , m_missingToEnd ) ; sorter . setSortInMemory ( m_sortInMemory ) ; BufferedDataTable sortedTable = sorter . sort ( exec ) ; checkCanceled ( ) ; ToXLogConverter handler = new ToXLogConverter ( ) ; handler . setConfig ( m_config ) ; handler . setLogger ( logger ) ; handler . convertDataTable2Log ( sortedTable , exec ) ; XLog log = handler . getXLog ( ) ; checkCanceled ( ) ; logPO = new XLogPortObject ( log ) ; logger . info ( "End : Convert DataTable to Event Log" ) ; return new PortObject [ ] { logPO } ; }
they must portOBject to PortObject, else not working.
they must portOBject to PortObject else not working .
// TODO: accept input DataTable, use the configuration columnNames,  // convert the data into XLog // how to check the type for this? // sort the table w.r.t. caseID column // here we might need to make sure they mean this // convert the string to date and sort them according to caseID? So we can read them easier for rows // it creates the corresponding column spec and create another DataTable for it. // one thing to remember, it is not so important to have order of timestamp. 